I'm a senior engineer with a ton of experience, and it was an interview for a challenging role at a major; I've come to expect that sort of thing on warm-up. It's a bozo filter before the real questions, and I should have been able to do it in my sleep.
Had they not heard of Fizzbuzz? Or reversing a string?