LogicDecode / hactoberfest2023

Pull request best of your code snippets to help open source community
MIT License
10 stars 143 forks source link

Remove duplicates from a given string #79

Closed Soumikmukhopadhyay closed 11 months ago

Soumikmukhopadhyay commented 11 months ago

Iterate through the string and for each character check if that particular character has occurred before it in the string. If not, add the character to the result, otherwise the character is not added to result.