Some of these interview questions are ultimately just about making the interviewer feel smart. I would say 99% of developers wouldn’t be able to answer this in an interview setting. If you had time to sit and think about it some could figure it out but really most developers don’t regularly spend time implementing core libraries. What matters is if you can apply them effectively.