How To Understand Leetcode Problems Python