I was recently asked this question on zillow phone screen.
The question was basically this one https://leetcode.com/problems/string-compression/
Once i solved it, I was asked what if the original string contains numbers, then how would you decode?
I replied, I could use a special character to denote number in the string.
the interviewer then asked what if special chracter is also present in the string?
It got annoying. I basically said we can go on and on about this but at some point we have to not allow special character in input set or scan for special characters in the beginning and then go about solving it. and then i ran out of time.
How would you solve for this question? Was the interviewer being an asshole?