Methods To Calculate Time Complexity