Basic Concepts -Sub-Algorithm
A sub-algorithm is an algorithmic module which is complete in itself and has independent existence. It can be used or called by some main algorithm or by some other sub-algorithm. It may or may not receive values from a calling algorithm. These values are called arguments or parameters. The sub-algorithm performs its task and then sends back the result to the calling algorithm. It can be called by many different algorithms or called at different places in the same algorithm. The relationship between an algorithm and a sub-algorithm is similar to the relationship between a main program (function) and a sub-program (sub-function) in a programming language.
Usefulness
When the problem is very complex, it is divided into several independent sub-problems. Each sub-problem is called sub-algorithm and can be developed independently. These sub-problems can be combined together to form the solution for the entire problem. Thus by using sub-algorithms the complex problems can be solved easily.
http://
http://
Contributed by:
Ritika Sood
Lecturer in computer science....Love to do programming...Other interests are sports, freaking out with frnds, travel at beautiful places, watch movies, listen songs....
Resourse address on xpode.com
http://www.xpode.com/Print.aspx?Articleid=91
Click here to go on website
|