• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
March 11, 2024 |1.6K Views
PROBLEM OF THE DAY : 10/03/2024 | Remove all duplicates from a given string
Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Karan Mashru. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Strings but also build up problem-solving skills.

In this problem, we are given a string str which may contain lowercase and uppercase characters. The task is to remove all duplicate characters from the string and find the resultant string. The order of remaining characters in the output should be same as in the original string.

Example :

Input:
str = "geEksforGEeks"
Output: 
"geEksforG"
Explanation: 
After removing duplicate characters such as E, e, k, s, we have string as "geEksforG".

Give the problem a try before going through the video. All the best!!!
Problem Link: https://www.geeksforgeeks.org/problems/remove-all-duplicates-from-a-given-string4321/1
Solution IDE Link: https://ide.geeksforgeeks.org/online-cpp-compiler/81ebcd66-550d-40bc-993d-9e06c4802722

Read More