Is there any better solution?


  • 0
    B

    I found out that most of the solution used DP to solve this question, but I wonder is there any tricky solution that may use less time?


Log in to reply
 

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