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.
First, quick sort is a divide and conquer approach, so it definitely could be solved by recursion.
Second, the purpose of keeping origin order, i think is to exactly follow the process of quick sort. The order is not mainted in current level, but by recursing down and then fi x the order bottom up.
So, i guess the purpose of this problem is to have a fundamental understanding of the process of quick sort.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Quicksort 2 - Sorting
You are viewing a single comment's thread. Return to all comments →
First, quick sort is a divide and conquer approach, so it definitely could be solved by recursion.
Second, the purpose of keeping origin order, i think is to exactly follow the process of quick sort. The order is not mainted in current level, but by recursing down and then fi x the order bottom up.
So, i guess the purpose of this problem is to have a fundamental understanding of the process of quick sort.