摘要:
刷LeetCode的时候经常要解决越界的问题,比如INT_MIN取绝对值就越界了,所以知道没种类型的最小值及最大值很有必要。long和int一般都是4字节,但是long在32位系统和64位系统不同,但我自己电脑64位win 8.1测试还是4个字节,可能和VS的设置也有关系。所以解决越界问题用long... 阅读全文
摘要:
Happy NumberWrite an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any posi... 阅读全文
摘要:
Fraction to Recurring DecimalGiven two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the ... 阅读全文