|
From: Per W. <pw...@ia...> - 2003-02-14 15:30:06
|
Walking a tree - or in this case traversing a directory structure - is a very simple operation, where there isn't really any practical differences between recursive or iterative solutions. You need very little state information to know where to continue with next step of the algorithm. /Per W On Fri, 14 Feb 2003, Matthew Nuzum wrote: > Some problems can only easily be solved with recursion. I use it about > 2-3 times per year. > > > > In fact, the last two times I used recursion was when working with > hierarchies. One time was reading in and processing files in a series > of folders and subfolders, the second time was taking information from a > database (for a shopping cart) and displaying it in a > category/subcategory view. > > > > It's important to understand how it works because when you need it, > you'll save a lot of time. > > > > -- > > Matthew Nuzum > > www.bearfruit.org > > co...@be... > > > > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf Of Santiago > Sent: Thursday, February 13, 2003 10:52 PM > To: dev-cpp-users-list > Subject: [Dev-C++] recursion > > > > Hello all, > > Simple one: how often, critical, and necessary is the usage of C++ > recursion in the "real world" programming field? > > > > Thanks > > San > > |