Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • What do you mean by changing the order of elements? Commented May 23, 2013 at 7:08
  • that line puts the last element in first position in your heap. Now I understand you call trickledown which changes many things but the only reason why your test fails is that heap.add(1000); heap.remove(); changes the heap when you expect it to be a "neutral" operation. Commented May 23, 2013 at 7:10
  • So deos that mean my test is bad? Commented May 23, 2013 at 7:16
  • @TimothyTurokDimChoi See my edit - the problem is not the test, it is your remove method. Commented May 23, 2013 at 7:20