for each num instream
    inserting num to stl::set()
    if size of set == k
         break

O(nlogk)


On Sun, Jun 2, 2013 at 10:49 AM, MAC <macatad...@gmail.com> wrote:

> Given an infinite stream of integers with only k distinct integers, find
> those distinct integers. How would you modify your solution if k is also
> very large and cannot use hash table.
>
>
>
>
>
> thanks
> --mac
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to algogeeks+unsubscr...@googlegroups.com.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.


Reply via email to