I have a question about my solution.

  • 0

    In my solution, I decided to add a 'break' in line 22. However, with this 'break' it returns an error. Without break, my solution accepted. Would you mind tell me why?
    0_1496065942883_屏幕快照 2017-05-29 下午9.51.57.png

  • 0

    because if you return, the code will end. So there is no need to add a "break" , and the break will never reach, so there will be an error

Log in to reply

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