Code ganker's anwer: http://blog.csdn.net/linhuanmars/article/details/20024907?locationNum=1&fps=1
For numeric questions, be aware of cases where input might be INTEGER.MAX_VALUE, INTEGER.MIN_VALUE, and abs(INTEGER.MIN_VALUE) = INTEGER.MAX_VALUE + 1
And also the case where number might be positive or negative.
Hello, welcome to Yizhe's Blog. I am Yizhe Liu, graduated from University of Arizona, with Master degree, major in Electrical and Computer Engineering. Actually, I am software guy. In my blog, many posts are about the Leetcode questions. I will post my ideas and implementations, which are accepted by Leetcode. If you have different opinions, please leave comment. I am happy to discuss with you. So lets start rocking them!!!
No comments:
Post a Comment