You are given a string s. Your task is to remove all consecutive duplicate characters. If the same characters appear next to each other, keep only one occurrence. Return the final string after removing duplicates.
Input: s = "aabbccdaa"
Output: "abcda"
Explanation: Consecutive duplicate characters are removed.

Input: s = "aaaa"
Output: "a"
Explanation: All duplicates are consecutive, so only one character remains.

Input: s = "abca"
Output: "abca"
Explanation: No consecutive duplicates are present, so the string remains unchanged.
Sign in to write, run, and submit your solution against the full test suite.