Guest User

Untitled

a guest
Jan 12th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. lolol(l, f){
  2.   n = l.size()
  3.   buckets = array(n)
  4.   r = []
  5.   foreach (e in l){
  6.     buckets[ floor(f(e) * n) ].add(e)
  7.   }
  8.   foreach (b in buckets){
  9.     x = insertion_sort(b)
  10.     r.append(x)
  11.   }
  12.  return r
  13. }
Add Comment
Please, Sign In to add comment