Leetcode Medium Level Array Methods In Pythons