Minimum Common Value Leetcode Solution 1980s