Circular Array Loop Leetcode Problems Python