upvote
I hate leetcode type questions. It's like "math Olympia" questions I had to deal with as a kid. Either you have seen the problem (or a variation of it) or there is no way of coming up with a solution under pressure.
reply