Can Place Flowers - Leetcode 605 - Python