Quote (carteblanche @ Oct 6 2012 02:20am)
can you explain whats wrong with 1 2 3 5 4? that looks perfectly valid to me, unless i'm mistaken
OMG I have just spent the last 3 hours on this lmao and its right hahaha, oh god thanks so much!!!
Wow im an idiot!
one other problem,
that I can't seem comprehend unless I use Type()
If I was to feed in say heapify([(5,), (4,), (3,), (2,), (1,)])
how would I get it to output [(1,), (2,), (3,), (5,), (4,)]
and also still work for lists
input heapify([[1], [2], [3], [5], [4]])
And get [[1], [2], [3], [5], [4]]
So basically I can input Tuples or Lists and get an output in the format inputed;
Would I have to use Type() everywhere?
This post was edited by BadKiwi on Oct 5 2012 08:28pm