Solved problem for n = 1
Implemented functiolalities to help test the efficiency of the algorithm