I have a question about this java solution, why it work?


  • 0
    Z

    alt text

    I am very confused that why the while condition is (end!=sc.length)?
    I think (end < sc.length ) should also work,but when I try, it says runtime error.

    Thanks!


Log in to reply
 

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