leetcode
jim_cainiaoxiaolang
我热爱大数据开发,希望大家多交流
展开
-
String to Integer (atoi)(java)
mplement 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 and ask yourself what are the possible input cases原创 2016-07-04 13:12:51 · 406 阅读 · 0 评论 -
Reverse Integer(java)
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this? Here are some good questions to ask before coding. Bonus points for you if原创 2016-07-03 15:19:09 · 266 阅读 · 0 评论 -
Two Sum(python)
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. Example: Given nums = [2,原创 2016-07-03 13:49:47 · 357 阅读 · 0 评论 -
Two Sum(java)
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. Example: Given nums = [2,原创 2016-07-03 13:36:04 · 216 阅读 · 0 评论 -
ZigZag Conversion(python)
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L S I I原创 2016-07-05 14:51:33 · 722 阅读 · 0 评论 -
ZigZag Conversion(java)
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L S I I原创 2016-07-05 14:37:15 · 299 阅读 · 0 评论 -
Roman to Integer(python)
Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 罗马数字转阿拉伯数字规则(仅限于3999以内): 从前向后遍历罗马数字,如果某个数比前一个数小,则加上该数。反之,减去前一个数的两倍然后加上该数 罗马数字 罗马数字是原创 2016-07-05 13:47:05 · 241 阅读 · 0 评论 -
Roman to Integer(java)
Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 罗马数字转阿拉伯数字规则(仅限于3999以内): 从前向后遍历罗马数字,如果某个数比前一个数小,则加上该数。反之,减去前一个数的两倍然后加上该数 罗马数字 罗马数原创 2016-07-05 13:18:53 · 203 阅读 · 0 评论 -
Palindrome Number (python)
Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to string, no原创 2016-07-04 15:24:36 · 357 阅读 · 0 评论 -
Palindrome Number(java)
Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to string, no原创 2016-07-04 15:18:38 · 236 阅读 · 0 评论 -
String to Integer (atoi)(python)
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 and ask yourself what are the possible input case原创 2016-07-04 14:55:47 · 288 阅读 · 0 评论 -
Reverse Integer (python)
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 click to show spoilers. Have you thought about this? Here are some good questions to ask before coding.原创 2016-07-03 15:41:01 · 1053 阅读 · 0 评论