DEV Community

Awdesh
Awdesh

Posted on • Edited on

2

Finding duplicates algorithm series- A string as an input.

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.

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay