Remove single character occurrence from String
I want an algo to remove all occurrences of a given character from a
string in O(n) complexity or lower? (It should be INPLACE editing original
string only)
eg.
String="aadecabaaab";
removeCharacter='a'
Output:"decbb"
No comments:
Post a Comment