4 ms·
My most recent interview involved a coding assignment, which I topically don't do, but this one was a very interesting challenge that would make a good blog pos
by ngngngng 8y ago
My most recent interview involved a coding assignment, which I topically don't do, but this one was a very interesting challenge that would make a good blog post afterwards so I did it. What was surprising is the interview not only included going over my code from the assignment, but also whiteboard problems about recursion. I've still never used recursion in my day job. Can interviewers really not gauge technical ability from my GitHub as well as chatting about problems and solutions?
- jarsin 8y agoInterviewer: I see you have built an app just like ours five years ago. That's great. OK now let's get to the important stuff. How many cakes can you steal from the queen if your duflle bag hold 5 pounds and there are 10 different kinds of cakes? True story.
- crsv 8y agoYou have a software engineering job and you never used recursion of any kind? This strikes me as super odd.
- vesrah 8y agoThey might generally use a library that handles a lot of common usages for recursion, like traversing a tree for whatever reason. A question I've had in an interview was what is the difference between recursion and iteration. Fairly easy to explain, including examples of usage.
- dpiers 8y agoI can only think of a couple occasions in my professional career where recursion made more sense than iteration. Both involved traversing trees with unknown depths (parsing XML and scanning a file system). That hasn't stopped it from showing up in every programming interview I've ever done.
- redisman 8y agoI haven't really used it for anything other than super simple things with a very tightly bound max input. Stack overflow and honestly many recursive algorithms are quite hard to parse in your head especially once you add some edge cases and some other entropy.
- dragonwriter 8y ago> Stack overflow Well, yeah, other than tail recursion with tail call optimization, stack consumption, if not stack overflow, is always an issue. > and honestly many recursive algorithms are quite hard to parse in your head especially once you add some edge cases and some other entropy. I find lot of things are easier to conceptualize recursively than iteratively, though parsing really depends a lot of the language.
- jpindar 8y agoI do embedded work. In this field some compilers don't even allow recursion.
- dingo_bat 8y agoIt's almost always a norm that you never use recursion in production code. Always convert it to iteration. Bounded iteration.
- dvlsg 8y agoDepends on the language too, I suppose. I'd be more shocked if they said they had never used recursion, but were using haskell at work.
- mushka 8y agoI too never used it. Recursion is usually an inferior solution.