自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 收藏
  • 关注

原创 【Leetcode】Palindrome Number

Determine whether an integer is a palindrome. Do this without extra space.回文就是左右颠倒之后还是一样的。不能用reverse integer的方法 ,可能会造成溢出的情况。使用除法和取余的方法。class Solution {public: bool isPalindrome(int x) {

2017-04-05 17:45:00 195 1

原创 【Leetcode】Reverse Integer

Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321需要考虑的点是int类型的范围是-2147483648~2147483648.可能会出现溢出状况 ,这里使用longlong类型避免这种情况class Solution {public:

2017-04-05 16:29:35 191

原创 【Leetcode】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 sam

2017-04-05 14:52:55 195

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除