if condition bro .... Doesn't matter if u put it inside or outside the loop . Theoretically also O(1) is added each time so efficiency remains as it is :p :palm_tree: