If we are to find frequency of only one number let us say 35 in infinite coming numbers , do xor operation with coming numbers If the result is 0 increment the value of temp variable by 1 if not scan next input until all numbers are over.................
On Tue, Sep 27, 2011 at 10:22 PM, Ankuj Gupta <[email protected]> wrote: > Infinite numbers are coming in a stream . how will you find the > frequency of a given number ? > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
