Last updated 3 years ago
Was this helpful?
Break the input into batches, each of which is of scale O(sqrt(N)) and handle each batch individually.
O(sqrt(N))