add lc chapter 1 question 3: remove duplicates from a string