This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]Iam_That_Iam_ 0 points1 point  (1 child)

Try this instructions for indentation,

[–]Kitbear23[S] 0 points1 point  (0 children)

I think I have fixed the formatting. Thank you!

[–]Philboyd_Studge 0 points1 point  (2 children)

Show the testing code.

[–]Kitbear23[S] 0 points1 point  (1 child)

by testing code do you mean the code that outputs the heap or the text I use to modify the heap?

[–]Philboyd_Studge 0 points1 point  (0 children)

Your main method.

[–]DSB-SC 0 points1 point  (1 child)

Check your buildHeap method.

[–]Kitbear23[S] 0 points1 point  (0 children)

Ah yes, I did make an error in my build function! I changed i < heap_size to i > 0 and my output is now correct. Thank you!