leetcode medium problem example