Leetcode 3351. Sum of Good Subsequences | Hello Interview