400. Nth Digit

问题来源:https://leetcode.com/problems/add-strings/  问题描述:Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ... N...

2016-11-11 13:40:37

阅读数 153

评论数 0

415. Add Strings

问题来源:https://leetcode.com/problems/add-strings/ 问题描述:Given two non-negative numbers num1 and num2 represented as string, return the sum of num1 and...

2016-11-10 13:34:39

阅读数 150

评论数 0

13. Roman to Integer

问题来源:https://leetcode.com/problems/roman-to-integer/  问题描述:Given a roman numeral, convert it to an integer.     我的代码:主要找出罗马数字规律即可。 int roman...

2016-11-09 11:04:12

阅读数 174

评论数 0

9. Palindrome Number

问题来源:https://leetcode.com/problems/palindrome-number/  问题描述:Determine whether an integer is a palindrome. Do this without extra space.     我的...

2016-11-08 12:46:29

阅读数 187

评论数 0

453. Minimum Moves to Equal Array Elements

问题来源:https://leetcode.com/problems/minimum-moves-to-equal-array-elements/  问题描述:Given a non-empty integer array of size n, find the minimum numb...

2016-11-07 14:55:03

阅读数 808

评论数 0

C++中stringstream的使用方法和样例

之前在leetcode中进行string和int的转化时使用过istringstream,现在大致总结一下用法和测试用例。     介绍:C++引入了ostringstream、istringstream、stringstream这三个类,要使用他们创建对象就必须包含sstream.h头文件。 i...

2016-11-06 15:46:49

阅读数 38034

评论数 0

8. String to Integer (atoi)

问题来源:https://leetcode.com/problems/string-to-integer-atoi/ 问题描述:Implement atoi to convert a string to an integer. Hint: Carefully consider all poss...

2016-11-03 16:20:03

阅读数 314

评论数 0

441. Arranging Coins

问题来源:https://leetcode.com/problems/arranging-coins/  问题描述:You have a total of n coins that you want to form in a staircase shape, where every k-th ...

2016-11-02 17:37:34

阅读数 140

评论数 0

172. Factorial Trailing Zeroes

问题来源:https://leetcode.com/problems/factorial-trailing-zeroes/   问题描述:Given an integer n, return the number of trailing zeroes in n!. Note: Your solut...

2016-11-02 16:55:27

阅读数 161

评论数 1

223. Rectangle Area

问题来源:https://leetcode.com/problems/rectangle-area/ 问题描述:Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is ...

2016-11-02 12:51:20

阅读数 140

评论数 0

414. Third Maximum Number

问题来源:https://leetcode.com/problems/third-maximum-number/   问题描述:Given a non-empty array of integers, return the third maximum number in this array. I...

2016-11-01 21:03:07

阅读数 198

评论数 1

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