Programming Algorithms Question:

Define and state the importance of sub algorithm in computation and its relation ship with main algorithm?

Programming Algorithms Interview Question
Programming Algorithms Interview Question

Answer:

A sub algorithm is an independent component of an algorithm and for this reason is defined separately from the main algorithm. The purpose of a sub algorithm is to perform some computation when required, under control of the main algorithm. This computation may be performed on zero or more parameters passed by the calling routine.


Previous QuestionNext Question
Counting set bits in a numberGive the difference of format between an algorithm and a sub algorithm?