Leetcode Implement Circular Buffer Python Snake