@StefanPochmann Fixed the first one. I don't figure out why the second one get wrong answer.
Hmm, they get accepted for the easy version of the problem. Did you just post under the wrong problem? If so, how did you get here from the OJ problem page?
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.