unless the interviewer plans to move the goal posts, there was no specified memory restriction in the original question.
"moving the goal posts" is called "every month at work, when you finish 1 task and then move on to another task, instead of going home and getting paid to rest on your laurels"
You want someone to answer a programming question within a particular set of boundaries, you set those boundaries.
"How you adapt in the face of additional constraints" is very much relevant to programming.