@demofox a long long time ago last time I was unemployed and job hunting I had an interview with apple and they asked me to reverse a linked list. so I said I'd use whatever library function is available. interviewer said no, pretend there isn't one. then I gave them a naive O(N) solution and then the interviewer said it was no good because it used recursion and thus too much stack memory and what if the device didn't have enough memory?!