Strings

Remove Duplicate Characters

easy
Given a string `s`, remove duplicate characters and return a string with each character appearing only once, preserving the **first** occurrence order. Example: `removeDuplicates("banana")` → `"ban"`.
Hint steps(0/3 revealed)
  1. 1

    Complete previous step or reveal to unlock this hint.

  2. 2

    Complete previous step or reveal to unlock this hint.

  3. 3

    Complete previous step or reveal to unlock this hint.