Leetcode Minimum Common Value