CCisco·DSAGrade 8Onsite – Coding 1
Remove a Given Character From a String
Problem
Remove all occurrences of a given character from a string in place.
Example
removeChar("banana", 'a') -> "bnn"
Constraints
- 0 ≤ |s| ≤ 10^5
Approach
Two-pointer write index; discuss immutability of strings in your language.
added 6 days ago