Re:Engineering whiteboard interviews: yay or nay?
by crsv on Thursday August 09, 2018 @04:31PM
(#17728199)
You have a software engineering job and you never used recursion of any kind? This strikes me as super odd.
[ Parent
| on HN ]
Re:Engineering whiteboard interviews: yay or nay?
by dpiers on Thursday August 09, 2018 @06:32PM
(#17729133)
I 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.
Re:Engineering whiteboard interviews: yay or nay?
by redisman on Thursday August 09, 2018 @09:40PM
(#17730064)
I 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.
Re:Engineering whiteboard interviews: yay or nay?
by dragonwriter on Friday August 10, 2018 @08:36AM
(#17732688)
> 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.
Re:Engineering whiteboard interviews: yay or nay?
by jpindar on Thursday August 09, 2018 @09:57PM
(#17730144)
I do embedded work. In this field some compilers don't even allow recursion.
Re:Engineering whiteboard interviews: yay or nay?
by vesrah on Thursday August 09, 2018 @04:36PM
(#17728237)
They 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.
Re:Engineering whiteboard interviews: yay or nay?
by mushka on Friday August 10, 2018 @04:27AM
(#17731585)
I too never used it. Recursion is usually an inferior solution.