TikTok interview question

Leetcode 316 Remove Duplicate Letters