Click here to Skip to main content
14,929,864 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
'We have a Paragraph in which we want to find out the word which are repeat how many time.That's give
output the word and no of time if it's come more tha one times')

1 solution


Declare a dynamic list. Each element should contain a variable-length string and a numeric count.

1. Input the next word
2. Compare it with each element in the list of words (this list is initially empty)
3. If it is found, increment the counter in that element
4. If it is not found, add it to the list and increment the counter in that element
5. If more words remain, repeat at step 1.
6. If no more words remain, scan the list and display the words and their counters

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900