someone help me with question?

Revision en1, by _aditya, 2018-02-18 13:19:46

i encountered this problem on a hiring contest and dont think its editorial will be provided. It goes like there's an array of n numbers and a number k is given. both n,k<=10^5 arr[i]<=10^5 we have to find minimum number of swaps so that all numbers greater than k are clubber together.

Tags #algorithms, #data structure, #adhoc

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English _aditya 2018-02-18 13:19:46 320 Initial revision (published)