![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
Titanzyh
这个作者很懒,什么都没留下…
展开
-
leetcode 9. Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.题意:判断一个数是不是回文数。 通常情况下,我们可以把这个数转化为一个字符串,然后反转,判断相等。但题目要求不能使用额外空间,所以,抛弃。我的想法是循环将数字反转,比较。public class Solution { public boolea原创 2017-08-14 19:21:03 · 261 阅读 · 0 评论 -
LeetCode 1. Two Sum
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 ele原创 2017-08-14 19:22:59 · 237 阅读 · 0 评论 -
LeetCode 7. Reverse Integer
Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321Note: The input is assumed to be a 32-bit signed integer. Your function should return 0 when the reversed int原创 2017-08-14 19:27:58 · 260 阅读 · 0 评论