Javascript program of kth smallest / largest in a small range unsorted array
let maxs = 1000001 ; function kthSmallestLargest ( arr , n , k ) { let max_val = Math . max ( ... arr ) ; let hash = new Array ( max_val + 1 ) ; for ( let i = 0 ; i < hash . length ; i ++ ) { hash [ i ] = 0 ; }