Leetcode Maximum Product Subarray Geeksforgeeks Python Dictionary