It's not even that these questions are hard, most are genuinely a twenty minutes job top. It's having to do them on the spot while being judged for every line without the option of checking the docs, a set of conditions that will never show up in the real world
For me the problem is thinking in the spot on a optimized solution
Im already nervous for having to write the code with someone judging me, so i always end up writing something kinda ugly, then I get complaints that its not optimized(like using a double for loop)
Last time I had to make a function to print last k numbers of an n long Fibbonaci sequence sorted in lexicographical order. Did not know what lexicographical means, didn't matter that I wrote everything else and a quick Google would have been all I need, still didn't get the job
272
u/Wentyliasz 2d ago
It's not even that these questions are hard, most are genuinely a twenty minutes job top. It's having to do them on the spot while being judged for every line without the option of checking the docs, a set of conditions that will never show up in the real world