Home All Groups Group Topic Archive Search About

word length occurance in a text..

Author
26 Sep 2006 8:58 PM
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

Author
27 Sep 2006 7:21 AM
Göran_Andersson
What is it that you need help with? Do you have problem understanding
your school assignmnet?


amit.sin***@gmail.com wrote:
Show quoteHide quote
> 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
>
Author
27 Sep 2006 9:07 AM
amit.sindri
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

Göran Andersson wrote:
Show quoteHide quote
> What is it that you need help with? Do you have problem understanding
> your school assignmnet?
>
>
> amit.sin***@gmail.com wrote:
> > 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
> >
Author
28 Sep 2006 4:06 AM
Cor Ligthert [MVP]
Amit,

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

microsoft.dotnet.languages.csharp

Cor

<amit.sin***@gmail.com> schreef in bericht
news:1159348041.026549.63440@e3g2000cwe.googlegroups.com...
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

Göran Andersson wrote:
Show quoteHide quote
> What is it that you need help with? Do you have problem understanding
> your school assignmnet?
>
>
> amit.sin***@gmail.com wrote:
> > 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
> >
Author
28 Sep 2006 9:40 PM
Göran_Andersson
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. :)


amit.sin***@gmail.com wrote:
Show quoteHide quote
> 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
>
> Göran Andersson wrote:
>> What is it that you need help with? Do you have problem understanding
>> your school assignmnet?
>>
>>
>> amit.sin***@gmail.com wrote:
>>> 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
>>>
>