Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: Mark Jason Dominus And Me - The Partition Problem

by tilly (Archbishop)
on Nov 14, 2012 at 02:43 UTC ( #1003733=note: print w/replies, xml ) Need Help??


in reply to Re^3: Mark Jason Dominus And Me - The Partition Problem
in thread Mark Jason Dominus And Me - The Partition Problem

Indeed. People who only know how to traverse a directory using recursion will suffer grief if they are asked to do it breadth-first instead. Recursion gives you an implicit stack. If you can unwind it to get an explicit stack instead, then switching between depth-first and breadth-first is as simple as switching from a stack to a queue.

But, one step at a time. Recursion is a great technique for thinking through a problem that you don't know how solve up front. Once you understand that solution, you can start trying to think of other approaches with other trade-offs. :-)

  • Comment on Re^4: Mark Jason Dominus And Me - The Partition Problem

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003733]
help
Chatterbox?
[atcroft]: choroba: I found something in the GitHub repo for it where someone suggested changing the limit in the search result URL, but I don't know how effective that will be....

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2017-04-29 05:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (531 votes). Check out past polls.