emory-courses / dsa-java

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

[HW#1] HybridSortBaseline #92

Closed guylikekai closed 3 years ago

guylikekai commented 3 years ago

I wanted to test out the HybridSortBaseline code on the example array given in the homework assignment, but when I run the robustness test (line 44 & line 62-72) it says that the test failed because the arrays differed at the first element. Did I write the unit test incorrectly?

Update: I printed out the result of using HybridSortBaseline on the array and it is not sorted correctly. I tried deleting HybridSortBaseline and directly copying the code from the professor's github doc but the same thing happens. Am I missing something?

lujiaying commented 3 years ago

I think HybridSortBaseline should work perfectly without failing in any test cases if codes are copied correctly.

guylikekai commented 3 years ago

Turns out there was an error in my shell sort! Thank you very much!