Remove Alternate Duplicate characters from a char array, you have to do it in Place. Like keeping only the odd occurrences of each character.
Example:
- Input: "you got beautiful eyes"
- Output: "you gtbeaiful es"
- Allowed Time Complexity was O(n) and Space Complexity was O(1)
This problem is popular in GeeksForGeeks, CareerCup, and other discussion forums - Link 1 A collection of hundreds of interview questions and solutions are available in our blog at Interview Question Solutions
Solution:
No comments:
Post a Comment