N/A Interview Question
Front-end Software EngineersCountry: India
Interview Type: Written Test
Modify quick-select to accomplish this in average O(N) time.
Quickselect the K'th largest element in the array - call it e.
Quickselect will partition the array such that all values greater than e will be on one side, and all values smaller will be on the other. Simply return all elements larger than or equal to e.
- NoOne September 20, 2016