In my opinion, it is much easier than most of the other
hard problems and should belong to
medium level. There is not too many tricks or algorithms involved, right?
Why is this question marked as 'hard'?
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.