Most candidates cannot solve this interview problem:
🔸 Input: "aaaabbbcca"
🔸 Output: [("a", 4), ("b", 3), ("c", 2), ("a", 1)]
Write a function that converts the input to the output
I ask it in the screening interview and give it 25 minutes
How would you solve it?