Replacing Recursion With a Stack
Posted by: youve been HAACKED,
on 05 Mar 2007 |
View original | Bookmarked: 0 time(s)
In Jeff Atwoods infamous FizzBuzz post, he quotes Dan Kegel who mentions. Less trivially, Ive interviewed many candidates who cant use recursion to solve a real problem. A programmer who doesnt know how to use recursion isnt necessarily such a bad thing, assuming the programmer is handy with the Stack data structure. Any recursive algorithm can be replaced with a non-recursive algorithm by using a Stack. As an aside, I would expect any developer who knew how to use a stack in this way would probably...