Basically exactly this question: https://leetcode.com/problems/read-n-characters-given-read4-ii-call-multiple-times/.
The one caveat was that I asked to use C++ to solve it. This was for an Oculus team, so the fact that I'd have to do this interview in C++ was known ahead of time.