Switch Pattern Matching Leetcode