Free Version Of Leetcode Problem 21