An eye-opening solution. However, I don't think the approach has much practical value. It is hard to understand, as much as it is to come up with. It is not right for an interviewer to expect a solution like this.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.