emory-courses / dsa-java

Data Structures and Algorithms in Java
https://emory.gitbook.io/dsa-java/
42 stars 55 forks source link

[HW1] won't return result #104

Closed brendacano closed 3 years ago

brendacano commented 3 years ago

https://github.com/brendacano/dsa-java/blob/master/src/main/java/edu/emory/cs/sort/hybrid/HybridSortHW.java

I was debugging my code as well as placed printlns to check everything. The code is able to sort the array but for some reason right before it can return the result it will call sort again even though it isn't a recursive method.

If the image helps, it shows that it got sorted displaying the final array. After checkpoint 5 it is supposed to return the result. But as you can see it goes back to checkpoint 1. I honestly have no idea what's happening. 2020-10-09

Kaseyc27 commented 3 years ago

Remove any print statements?

brendacano commented 3 years ago

I removed the print statements when I committed and pushed the code.