自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 【LeetCode-easy-13-Roman to Integer】-python

PROBLEMGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.EXAMPLEInput:IVOutput:4题目解析这道题主要需要搞清楚罗马数字和阿拉伯数字的转换规则,每个字母代表多少以及排列顺序对数字大小的影响等,搞清楚这些,只要按照...

2018-03-04 23:12:34 125

原创 【LeetCode-easy-9-Palindrome Number】-python

PROBLEMDetermine whether an integer is a palindrome. Do this without extra space.EXAMPLEInput:12321 Output:True题目解析判断一个数字是否为回文数字,要求不能使用额外的空间。解题思路根据回文数字的特性,前后移动比较至中间,一样即为True,否则为False。我的代码少用了一个判断,所以循环上...

2018-03-04 22:55:52 118

原创 【LeetCode-easy-7-Reverse Integer】-python

PROBLEMGiven a 32-bit signed integer, reverse digits of an integer.EXAMPLESInput: 123 Output: 321Input: -123 Output: -321Input: 120 Output: 21题目解析题目是将一个32位整数倒转,这在python里实现非常容易实现,使用数组的倒转即可。需要注意的有两点,①倒...

2018-03-04 22:34:05 158

原创 【LeetCode-easy-1-Two Sum】-python

PROBLEMGiven 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 ...

2018-03-04 21:28:54 139

空空如也

空空如也

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

TA关注的人

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