摘要:
Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 把十进制转为罗马数 罗马数字的基本符号有I(表示十进制数1),V(表示5),X(表示 阅读全文
摘要:
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo 阅读全文
摘要:
Determine whether an integer is a palindrome. Do this without extra space. 判断一个数是否是回文数。 阅读全文
摘要:
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below 阅读全文
摘要:
Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 注意读入和返回的数都是 int 型的,这时就要考虑反转后这个数会不会超 int,超的话就返回 0 。这时处理数时最好用 阅读全文