3 ms·
You have a software engineering job and you never used recursion of any kind? This strikes me as super odd.
by crsv 8y ago
You 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.