The space factor when determining the efficiency of the algorithm is measured by counting the maximum memory needed by the algorithm.
Analysis of an algorithm can be performed in different stages, before implementation, and after completion.
• Algorithm analysis is conducted through the running time of operation and can be characterized as the sequence of specific instructions of each operation.
• Space complexity signifies the amount of memory space necessary for the algorithm in its lifecycle.
• The space required by an algorithm is equal to the sum of the subsequent two factors.
• A fixed part is a space necessary to harbor certain information and variables which are not contingent on the size of the problem.
• For example, this would be recursion stack space, dynamic memory allocation.
• Space intricacy S(p) of any algorithm p is S(p)= A + Sp (I) where A is handled as the fixed part, and S(I) is treated as the variable part of the algorithm.