Char Removal

BE MINDFUL:

  1. Do NOT use ".deleteCharAt()". When the first target is deleted, all chars to the right are shifted to the left by one index. Therefore, the next target could be missed during iteration.

  2. Avoid using API when not knowing the complexity of usage, such as deleteCharAt(), subString(start, end), string1 + string2.

Last updated

Was this helpful?