Skip to content

Latest commit

 

History

History
2 lines (2 loc) · 197 Bytes

README.md

File metadata and controls

2 lines (2 loc) · 197 Bytes

Random-subset

Given N and K, produces and ordered random subset of [|1, N|] containing K elements. The elements are returned one by one. Time complexity is O(K*log(N)). Space complexity is O(1).