Non Recursive Algorithm Time Complexity