Well Hi to all ,
I think the things aren't so complicated as they look here
I suppose there is a list of N numbers in a Linked List(along with the
frequency).
Whenever a user types a new word (recognized by a space),
this word is matched with the available words in the list
if (match)
{
++frequency
swap with upper element if freq. is higher[arrays will b good for
this]
}
else (if there isn't any match)
reorganize the list for last N words.
Overall i used linked list coz. there is going to b lot of insert &
delete .
Regards,
Pawan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---