Minimum Common Value Leetcode 150