As the time goes the complexity in hardware and software increases. This increase in hardware and the software space and time reduces the efficiency of the system in which it is used. There are several methods to optimize these two components. In this work it has been processed in the area of software. Basically the program optimization is done using the for loop structure. The for loop structure will have a control components, these components are used for the purpose of generating an equation. This equation is based on the progression. The components of the for loop is substituted in the arithmetic and geometric progression equation to reduce the timing of the for loop. The result shows that, a drastic change in the time complexity from 0(n) to 0(1) for a simple example. This can be further for all loops.
Volume 12 | Issue 1