自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 记录leetcode第十三天(70. Climbing Stairs)

记录leetcode第十三天(70. Climbing Stairs) 1.题目 You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to th...

2019-07-02 16:37:59 79

原创 记录Leetcode第十二天(67. Add Binary +偶然看到的atoi() c_str())

记录Leetcode第十二天(67. Add Binary +偶然看到的atoi() c_str()) 1.题目 Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1 or 0. 2....

2019-06-28 22:51:47 108

原创 记录leetcode十一天(66.Plus One+vector的emplace优化)

记录leetcode十一天(66.Plus One+vector的emplace) 1.题目 Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most significant digi...

2019-06-27 23:08:28 104

原创 记录Leetcod第十天(58. Length of Last Word)+ stringstream

记录Leetcod第十天(58. Length of Last Word)+ stringstream 1.题目 Given a string s consists of upper/lower-case alphabets and empty space characters ’ ', return the length of last word in the string. If the la...

2019-06-26 22:46:55 80

转载 记录Leetcode第九天(53. Maximum Subarray)

记录Leetcode第九天(53. Maximum Subarray) 1. 题目 Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. 2. 例子 Input: [-2,1,-...

2019-06-25 21:54:30 98

原创 记录LeetCode第八天(38. Count and Say + string末尾加字符串+int 转换成 string)

记录LeetCode第八天(38. Count and Say) 1. 题目 The count-and-say sequence is the sequence of integers with the first five terms as following: 1 1 2 11 3 21 4 1211 5 111221 1 is read off a...

2019-03-02 06:43:10 148

原创 记录LeetCode第八天(35. Search Insert Position)

记录LeetCode第八天(35. Search Insert Position) 1.题目 Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order...

2019-03-01 09:01:13 72

原创 记录LeetCode第七天(28. Implement strStr()和s.find和KMP)

记录LeetCode第七天(28. Implement strStr()和s.find和KMP) 1. 题目 Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Clarification: What ...

2019-02-28 07:30:07 119

原创 记录LeetCode第五天(26. Remove Duplicates from Sorted Array 27.Remove Element)和for (int n : nums) 和 find

记录LeetCode第五天 1. 题目 Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must...

2019-02-26 01:18:11 339

原创 记录LeetCode第五天(21. Merge Two Sorted Lists和链表和vector)

记录LeetCode第五天(21. Merge Two Sorted Lists) 1. 题目 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 2.例子 Examp...

2019-02-25 01:31:45 76

转载 记录LeetCode第四天(Valid Parentheses和stack栈)

记录LeetCode第四天(Valid Parentheses) 1. 题目 Given a string containing just the characters ‘(’, ‘)’, ‘{’, ‘}’, ‘[’ and ‘]’, determine if the input string is valid. An input string is valid if: Open bracket...

2019-02-24 08:03:49 71

原创 记录LeetCode第三天( Longest Common Prefix和strs[0].substr(0,i))

记录LeetCode第三天( Longest Common Prefix) 1. 题目 Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string “”. 2. 例子 Exampl...

2019-02-23 22:39:44 423

原创 记录LeetCode第三天(Roman to Integer)

记录LeetCode第三天(Roman to Integer) 1. 题目 Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For exa...

2019-02-22 06:51:05 77

原创 记录LeetCode第二天(Reverse Integer& Palindrome )

记录LeetCode第二天(Reverse Integer) 1.题目 Given a 32-bit signed integer, reverse digits of an integer. Note: Assume we are dealing with an environment which could only store integers within the 32-bit signe...

2019-02-21 07:35:08 97

原创 记录Leetcode第一天(Two Sum和unordered_map)

记录LeetCode第一天(Two Sum)1.题目2.例子3.代码4. unordered_map参考 1.题目 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 woul...

2019-02-20 22:52:05 184

空空如也

空空如也

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

TA关注的人

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