Why the problem is classified as "hard"?


  • 0
    0

    I think it should be at most "medium" if not "easy". I constructed and coded O(N) time algorithm in one breath. According to other discussions and shared solutions posted here other participants don't have fundamental issues on approaching the problem, but rather try to optimize further, do it with O(1) memory and so on.


  • 0
    M

    Simply because you're a genius.


Log in to reply
 

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