自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 House Robber

题目来源:Leetcode Algorithm ProblemSet 198 题目描述:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you

2018-01-21 10:19:14 95

原创 jump game

题目来源:Leetcode Algorithm ProblemSet 55 题目描述:Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your

2018-01-21 10:14:32 118

原创 Candy

题目来源:Leetcode Algorithm ProblemSet 135 题目描述: There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the followin

2018-01-18 13:28:55 114

原创 Binary Tree Level Order Traversal

题目来源:Leetcode Algorithm ProblemSet 102 题目描述: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example: Given binary t

2018-01-18 13:25:40 100

原创 Unique Paths

题目来源:Leetcode Algorithm ProblemSet 62 题目描述:A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any po

2018-01-17 10:53:42 90

原创 Combination Sum

来源:Leetcode Algorithm ProblemSet 39 题目描述:Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T

2018-01-17 10:51:12 101

原创 Permutations

题目来源:LeetCode ProblemSet 46 题目描述:Given a collection of distinct numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [ [1,2,3], [1,3,2], [2,

2018-01-17 00:32:32 88

原创 Maximum Subarray

来源:Leetcode Problem Set - Algorithm Problem53 题目描述: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the arr

2018-01-10 16:58:30 95

原创 Range Sum Query - Immutable

来源:Leetcode Problem Set - Algorithm Problem303 题目描述: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given nums = [-2

2018-01-10 16:54:34 88

原创 Roman to Integer

来源:Leetcode Problem Set - Algorithm Problem13 题目描述: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 解题思路:与12题类似,读取字符串进行翻

2018-01-10 16:34:59 90

原创 Integer to Roman

来源:Leetcode Problem Set - Algorithm Problem12 题目描述: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 解题思路: 首先简单介绍一下罗马数字,

2018-01-10 16:28:39 72

原创 Palindrome Number

来源:Leetcode Problem Set - Algorithm Problem9 题目描述: Determine whether an integer is a palindrome. Do this without extra space. 解题思路:判断数字是否回文,简单想法是从头尾依次读取数字进行对比,若相同则去掉数字往前比对,尝试后发现这样中间的0会被

2018-01-10 16:12:13 84

原创 ZigZag Conversion

来源:Leetcode Problem Set - Algorithm Problem6 题目描述: 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 fi

2018-01-10 16:08:21 85

原创 Longest Palindromic String

来源:Leetcode Problem Set - Algorithm Problem5 题目描述:Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. 解题思路:使用动态规划的思想,建立一个n

2018-01-04 11:43:26 214

原创 Median of Two Sorted Arrays

来源:Leetcode Problem Set - Algorithm Problem4 题目描述:There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexi

2018-01-04 10:56:44 125

原创 Reverse Integer

来源:Leetcode Problem Set - Algorithm Problem7 题目描述:Given a 32-bit signed integer, reverse digits of an integer. 解题思路:先判断数字的正负,然后判断数字,按位逐个读取数字,使用除以10得到每一位的数字 代码解答: class Solution { public:     int

2018-01-04 10:51:29 82

原创 Longest Substring Without Repeating Characters

Leetcode Problem SetAlgorithm Question 3Problem description:Given a string, find the length of the longest substring without repeating characters.Example:Given “abcabcbb”, the answer is “abc”, which th

2017-09-25 09:35:37 183

原创 Add Two Numbers

Leetcode Problem SetAlgorithm Question 2Problem description:You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nod

2017-09-19 12:47:52 286

原创 Two Sum

Leetcode Problem SetQ1 Two SumProblem description: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 exac

2017-09-11 13:22:33 165

空空如也

空空如也

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

TA关注的人

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