We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
About this one, I had to change my code from in-place swaping to left/right sublist and merge 'em. If you use in-place method 1st test fails because the final order is 3 2 4 5 7 instead of 3 2 4 7 5 which is ok too.
Can be the unit tests assertions more flexible at this point using an OR or something like? If don't i think a revision on problem descrition would be fine. Anyway, i'd left the swap version of the c++ code commented =(
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Quicksort 1 - Partition
You are viewing a single comment's thread. Return to all comments →
Hi! Thanks for this basic challenges!
About this one, I had to change my code from in-place swaping to left/right sublist and merge 'em. If you use in-place method 1st test fails because the final order is 3 2 4 5 7 instead of 3 2 4 7 5 which is ok too. Can be the unit tests assertions more flexible at this point using an OR or something like? If don't i think a revision on problem descrition would be fine. Anyway, i'd left the swap version of the c++ code commented =(