Loop time complexity

shape