remove duplicate characters

2 Ways to Remove Duplicate Characters from a String in O(n) Time

Given an input string, the goal is to remove duplicate characters from a string and the output string should have the resultant string without modifying the order of characters in the original string. Let’s solve the above problem in O(n)… Read More!

remove duplicates

2 Ways to Remove Duplicates from Sorted Array – O(n) time

Given an input array of integers, your goal is to remove duplicates present from an sorted array in O(n) time by method 1: using extra space i.e., O(n) space and by method 2: using constant space i.e., O(1) space. Method 1:… Read More!