Double For Loop Time Complexity