自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 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, ...Note:n is positive and will fit within the ra

2016-11-11 13:40:37 274

原创 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 num2.

2016-11-10 13:34:39 294

原创 13. Roman to Integer

问题来源:https://leetcode.com/problems/roman-to-integer/ 问题描述:Given a roman numeral, convert it to an integer.    我的代码:主要找出罗马数字规律即可。int romanToInt(string s){ map roman; roman.insert(pair('I'

2016-11-09 11:04:12 332

原创 9. Palindrome Number

问题来源:https://leetcode.com/problems/palindrome-number/ 问题描述:Determine whether an integer is a palindrome. Do this without extra space.    我的代码:问题较简单,解决方案较多,直接上代码:bool isPalindrome(int x){

2016-11-08 12:46:29 316

原创 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 number of moves required to make all array elements e

2016-11-07 14:55:03 942

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

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

2016-11-06 15:46:49 55928

原创 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 possible input cases.

2016-11-03 16:20:03 446

原创 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 row must have exactly k coins. Given n, find

2016-11-02 17:37:34 258

原创 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 solution should be in logarithmic time complexity.

2016-11-02 16:55:27 396 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 defined by its bottom left corner and top right corner.

2016-11-02 12:51:20 285

原创 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. If it does not exist, return the maximum number

2016-11-01 21:03:07 366 1

空空如也

空空如也

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

TA关注的人

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