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.
I have two doubts -
1. In actual partition algorithm, the order of elemnets do no remain same after partition. Then why here we are asked to preserve the order?
2. We can use the partition algorithm using single array i.e. in-place which is more optimized then why we are asked to use two arrays?
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 →
I have two doubts - 1. In actual partition algorithm, the order of elemnets do no remain same after partition. Then why here we are asked to preserve the order? 2. We can use the partition algorithm using single array i.e. in-place which is more optimized then why we are asked to use two arrays?