Find the K | Function to find the K - th minimum element from an array concatenated M times ; Sort the elements in ascending order ; Return the K 'th Min element  present at ( (K-1) / M ) index ; Driver Code
function KthMinValAfterMconcatenate ( A , N , M , K ) { A . sort ( ( a , b ) => a - b ) return ( A [ ( ( K - 1 ) / M ) ] ) ; } var A = [ 3 , 1 , 2 ] ; var M = 3 , K = 4 ; var N = A . length ; document . write ( KthMinValAfterMconcatenate ( A , N , M , K ) ) ;