Walk through N tiles and visualize O(N) linear time complexity!
You're looping more than once! This increases complexity to O(2N) or worse!
O(N) means the number of operations grows linearly with input size N.
Real examples of O(N): Finding sum, finding max/min, linear search, printing all elements