Can anyone tell me the approach of these 2 question I recently got these question in one of my interview was able to solve some part of the questions but stuck at other.
https://leetcode.com/discuss/interview-question/558519/a-matter-of-mattress
https://leetcode.com/discuss/interview-question/558515/bracket-expression
I only want to know the approach and how to solve these kind of problems.