- 博客(4)
- 收藏
- 关注
原创 醒醒,该刷题了!——LeetCode_9_PalindromeNumber
Determine whether an integer is a palindrome. Do this without extra space.确认一个整数是否是回数。例如:1234321为回数,12345不是。分析:这个题其实考查的核心还是整数反转,如果一个整数反转后与反转前相同,则为回数。java代码如下:class Solution { public boolean isPali...
2018-03-19 16:50:17 134
原创 醒醒,该刷题了!——LeetCode_7_ReverseInteger
Given a 32-bit signed integer, reverse digits of an integer.给出一个32位大小的整数(-2147483648~2147483648),逆序输出它。比如:Input: 123 Output: 321Input: -123 Output: -321Input: 120 Output: 21分析:用循环语句,第一次循环先将输入整数最后一位取出...
2018-03-18 18:43:37 170
原创 醒醒,该刷题了!——LeetCode_2_AddTwoNumbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return i...
2018-03-16 20:32:58 186
原创 醒醒,该刷题了!——LeetCode_1_TwoSum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the same el...
2018-03-16 10:04:09 278
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人