Jos iz vremena dok sam na natjecanjima morao rjesavati matematicke probleme, rekurzija mi se svidjala kao koncept - tako banalan, a tako koristan koncept.
U danasnje vrijeme instant programera sa stambiljima po knjizicama i fantasticno brze programerske evolucije, mnogi nisu ni culi za taj izraz, pa evo par linkova na temu rekurzije, i njene prakticne primjene u PHPu.
Wikipedia - Recursion
PHP primjena - Storing Hierarchical Data in a Database
PHP - Solving Problems with Recursion
Recursion in plain English
Recursion is the process a procedure goes through when one of the steps of the procedure involves rerunning the entire same procedure. A procedure that goes through recursion is said to be recursive. Something is also said to be recursive when it is the result of a recursive procedure.
To understand recursion, one must recognize the distinction between a procedure and the running of a procedure. A procedure is a set of steps that are to be taken based on a set of rules. The running of a procedure involves actually following the rules and performing the steps. An analogy might be that a procedure is like a menu in that it is the possible steps, while running a procedure is actually choosing the courses for the meal from the menu.
A procedure is recursive if one of the steps that makes up the procedure calls for a new running of the procedure. Therefore a recursive four course meal would be a meal in which one of the choices of appetizer, salad, entrée, or dessert was an entire meal unto itself. So a recursive meal might be potato skins, baby greens salad, chicken parmesan, and for dessert, a four course meal, consisting of crab cakes, Caesar salad, for an entrée, a four course meal, and chocolate cake for dessert, so on until each of the meals within the meals is completed.
It is important to note that a recursive procedure must complete every one of its steps. Even if a new running is called in one of its steps, each running must run through the remaining steps. What this means is that even if the salad is an entire four course meal unto itself, you still have to eat your entrée and dessert.
Mislim da je ovo dovoljno stiva za pocetak Za one koji zele vise informacija, na kraju svakog od gorenavedenih clanaka imate linkove za detaljnije informiranje o rekurzijama.
Al-ex.net - photoshop tutoriali - tutorialsOracle PHP CookbookPhotoshop Tutorials (advanced)Practical PHP Programming - Free PHP knjiga - onlineCameraTown.com Guides - Free Photography How-To Guides and TutorialsMorgueFile.com - free photos, images, manuals, tutorials, digital photographyPHP object oriented programming - tutorial
Was this article helful to you?
If so, please click on the (+)
[plus] sign below! It's Croatian digg