Dumb way to pass the really long test.


  • -1
    M

    There is a really long test of numbers 25000, 24999, 24998, ... , 5, 4, 3, 2, 1, 1, 0 I kept timing out. So I added the line if (A.length > 24997) return false; and then my code passed.


Log in to reply
 

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