Given a string s, remove all duplicate characters so that each character appears only once.
The relative order of the first occurrence of each character must be preserved.
Return the resulting string.
Input: A single string s.
Output: A string with all duplicate characters removed, preserving first-occurrence order.
Input: programming
Output: progamin
Explanation: p(1st),r(1st),o(1st),g(1st → 2nd skip),r(skip),a(1st),m(1st → 2nd skip),i(1st),n(1st) → 'progamin'Input: banana
Output: ban
Explanation: b(keep), a(keep), n(keep), a(dup skip), n(dup skip), a(dup skip) → 'ban'Input: abcd
Output: abcd
Explanation: No duplicates exist; string is returned unchanged.0 <= s.length <= 10^5s consists of printable ASCII characters