Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Data.List
- bit i j = big_oh_1_of_accessing_A
- get _ [] = []
- get k xs
- | length zero < length one = 0 : get (k+1) zero
- | otherwise = 1 : get (k+1) one
- where (zero, one) = partition (\x -> bit x k == 0) xs
- missing n = foldl1 (\a b -> a * 2 + b) $ get 0 [0..n-1]
Add Comment
Please, Sign In to add comment