ya its dumb, but also CTCI question 4 or something or linkedlist chapter
If they actually aren't looking for people who just cram CTCI or leetcode, coming to this answer from first principles is demonstrably far more difficult than you'd expect achieved in an interview.
These sort of questions have an incredible recency bias, and have zero relevance to engineering competence.
Of course; how else do you do back-door age discrimination?