Q1 Slight variation of https://leetcode.com/problems/random-pick-index/description/ Q2 https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses/description/