Algorithm: use a map of string and int map<string,int>freq; first scan the book to calculate the frequency of occurrences of each word now just print the value for the given word disadvantage: complete words needs to be scanned time complexity:O(number of total words present in a book)
On 10/24/12, rahul sharma <[email protected]> wrote: > > > -- > 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. > > -- Thanks & Regards Khadar Basha Ph:+91-9553109901. -- 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.
