1209. Remove All Adjacent Duplicates in String II
Medium
Input: s = "abcd", k = 2
Output: "abcd"
Explanation: There's nothing to delete.Input: s = "deeedbbcccbdaa", k = 3
Output: "aa"
Explanation:
First delete "eee" and "ccc", get "ddbbbdaa"
Then delete "bbb", get "dddaa"
Finally delete "ddd", get "aa"Input: s = "pbbcggttciiippooaais", k = 2
Output: "ps"Last updated