Leetcode Python Data Structures Geeksforgeeks Problem