Edit :I elaborated My Question More ..solutions are here for one fix duplicate word .. I was asked about every duplicate word
I am a Newbie ...Might be not a Good question . ......
this is string
string str = "this this is is a a string"
in Interview ,i was asked to store the count of every duplicate keyword in generic Dictionary and then display them in Order 
for example No of occurance of "is" keyword is 2
similar Links 
:
Find the most occurrence of a character in string C#?  this is about finding character 
Finding occurrences of words in text which are in a list words  this is in python 
Remove occurrences of duplicate words in a string  this in javaScript 
How to use the string.match method to find multiple occurrences of the same word in a string?  Not relevant 
..please Suggest
 
     
     
     
    