Skip to content
Advertisement

Tag: recurring

Find the first Recurring letter in Java

I wrote the code as follows but it doesn’t return the first recurring letter properly. Example: In the word “statistics” the recurring letters are s, t, and i. But the letter t recurs sooner than the letter s and i, but my program returns s instead of t. What do I need to do for it to return t, using

Advertisement