Minimum Common Value Leetcode Javascript Problems Practice