SHARE
TWEET

Untitled

a guest Jun 27th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. a[] : keys
  3. b[i] : values
  4.  
  5. for (i = 0;i<a.Length-1;++i)
  6.    for (j = i+1;j<a.Length;j++)
  7.       if (a[i]>a[j])
  8.       {
  9.  
  10.          swap(a[i],a[j])
  11.         // swap(perm[i],perm[j])
  12.         swap(b[i],b[j])
  13.  
  14.          
  15.          }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top