Google Interview Question: Find Kth Smallest/Largest value in JavaScript

Google Interview Question: Find Kth Smallest/Largest value in JavaScript

Use Quick Sort Lomuto partition scheme(modified) to solve the find kth largest or smallest value in the array. A javascript solution