![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
文章平均质量分 56
newbie_ljm
这个作者很懒,什么都没留下…
展开
-
Leetcode 第12题Integer to Roman
题目:Integer to Roman Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999. 题目分析: 题目的含义是将1到3999的数字转换为对应的罗马符号 思路: 根据罗马符号的特点和数字表达的特点,建立一个数字将0到9;10到90;10原创 2015-12-08 23:37:56 · 436 阅读 · 0 评论 -
Leetcode 第13题Roman to Integer
题目:Roman to Integer Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999. 题目含义: 将罗马符号转换为对应数字大小的整型数字 思路: 对于罗马符号I代表的是1;V代表的是5;X代表的是10; L代表的是50;C代表的是10原创 2015-12-08 23:30:10 · 338 阅读 · 0 评论 -
Leetcode 第268题Missing Number
题目:Missing Number Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array. For example, Given nums = [0, 1, 3] return 2.Note: Your algorithm原创 2015-12-20 20:58:37 · 337 阅读 · 0 评论 -
Leetcode 第119题 Pascal's Triangle II
题目:Pascal’s Triangle II Given an index k, return the kth row of the Pascal’s triangle.For example, given k = 3, Return [1,3,3,1].Note: Could you optimize your algorithm to use only O(k) extra space?原创 2015-12-03 23:38:03 · 193 阅读 · 0 评论 -
Leetcode 第118题 Pascal's Triangle
题目:Pascal’s Triangle Given numRows, generate the first numRows of Pascal’s triangle.For example, given numRows = 5, Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] ] Subscribe to s原创 2015-12-03 23:33:06 · 295 阅读 · 0 评论 -
Leetcode 第20题 Valid Parentheses
题目:Valid Parentheses Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.The brackets must close in the correct order, “()” and “()[]{}原创 2015-12-01 20:21:41 · 380 阅读 · 0 评论 -
Leetcode 第190题 Reverse Bits
题目:Reverse Bits Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary a原创 2015-12-01 16:30:56 · 251 阅读 · 0 评论 -
Leetcode 第88题 Merge Sorted Array
题目:Merge Sorted Array Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note: You may assume that nums1 has enough space (size that is greater or equal to m +原创 2015-12-01 15:30:59 · 297 阅读 · 0 评论 -
Leetcode 第191题 Number of 1 Bits
题目:Number of 1 Bits Write a function that takes an unsigned integer and returns the number of ’1’ bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11’ has binary represen原创 2015-11-29 23:47:41 · 289 阅读 · 0 评论 -
Leetcode 第6题ZigZag Conversion
题目:ZigZag Conversion 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原创 2015-12-10 23:18:30 · 266 阅读 · 0 评论 -
Leetcode 第2题Add Two Numbers
题目:Add Two Numbers You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and r原创 2015-12-10 23:08:50 · 377 阅读 · 0 评论 -
Leetcode 第278题 First Bad Version
题目:First Bad Version You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is de原创 2015-12-25 22:52:17 · 206 阅读 · 0 评论