Finding duplicates algorithm series- A string as an input.

twitter logo github logo Updated on ・1 min read

In my last post

I wrote about finding duplicates inside an array of integers. What if input is a string instead of integers? Could we solve the problem in same way we did before?

String is essentially an array of characters so we still could use HashTable/ Set like before to store chars instead this time.

Example

Although algorithm wise we didn’t learn new anything but now we know that strings are essentially an array of chars and we could utilize that fact going forward in string related problems.

twitter logo DISCUSS
Classic DEV Post from Mar 20

What does a dev's personal website need to include?

Awdesh profile image
Learner, philomath. Engineer by choice humorous by nature.

Hey there reader...

Do you prefer sans serif over serif?

You can change your font preferences in the "misc" section of your settings. ❤️