word length occurance in a text..

  • Thread starter Thread starter amit.sindri
  • Start date Start date
A

amit.sindri

Write the code in best possible way c# for giving out put the maximum
number of time the same word length occurs.the text might contain . ,
to seperate word too..

Eg INPUT TEXT : "This text is test sample.Text lenght that occurs
maximum time.

OUT PUT : Word with length :4 Maximum occured :6
 
What is it that you need help with? Do you have problem understanding
your school assignmnet?
 
It is nothing as such i have solved the problem asked in interview but
i wud like the best way as i feel i have unessary used lot of loops to
find the result
 
Amit,

We try not to give C# samples in this newsgroup.
Try for that the newsgroup

microsoft.dotnet.languages.csharp

Cor

<[email protected]> schreef in bericht
It is nothing as such i have solved the problem asked in interview but
i wud like the best way as i feel i have unessary used lot of loops to
find the result
 
It would be an interresting task to accomplish it without any loops at
all. I think that it can be done using a sorted dictionary, a regular
expression and a custom match evaluator.

Trying...

Well, what do you know... The dictionary isn't needed at all, so it can
be done with just a regular expression and a custom match evaluator. :)
 
Back
Top