自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Leetcode算法学习日志-62 Unique Paths

Leetcode 62 Unique Paths题目原文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 point in time.

2017-11-12 15:18:03 238

原创 Leetcode算法学习日志-611 Valid Triangle Number

Leetcode 611 Valid Triangle Number 题目原文Given an array consists of non-negative integers, your task is to count the number of triplets chosen from the array that can make triangles if we take t

2017-11-09 21:43:10 519

原创 Leetcode算法学习日志-137 Single Number II

Leetcode 137 Single Number II题目原文Given an array of integers, every element appearsthree times except for one, which appears exactly once. Find that single one.Note:Your algorithm should ha

2017-11-09 10:21:01 246

原创 Leetcode算法学习日志-341 Flatten Nested List Iterator

Leetcode 341 Flatten Nested List Iterator题目原文Given a nested list of integers, implement an iterator to flatten it.Each element is either an integer, or a list -- whose elements may also be int

2017-11-07 20:37:20 477

原创 Leetcode算法学习日志-78 Subsets

Leetcode 78 Subsets题目原文Given a set of distinct integers,nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.For example,If nums =

2017-11-07 19:29:33 286

原创 Leetcode算法学习日志-173 Binary Search Tree Iterator

Leetcode 173 Binary Search Tree Iterator题目原文Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the

2017-11-05 15:23:16 327

原创 Leetcode算法学习日志-563 Binary Tree Tilt

Leetcode 563 Binary Tree Tilt题目原文Given a binary tree, return the tilt of the whole tree.The tilt of a tree node is defined as theabsolute difference between the sum of all left subtree nod

2017-11-02 12:00:19 299

原创 Leetcode算法学习日志-561 Array Partition I

Leetcode 561 Array Partition I题目原文Given an array of 2n integers, your task is to group these integers inton pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, b

2017-11-02 11:21:50 259

原创 Leetcode算法学习日志-553 Optimal Division

Leetcode 553 Optimal Division题目原文Given a list of positive integers, the adjacent integers will perform the float division. For example, [2,3,4] -> 2 / 3 / 4.However, you can add any number of

2017-11-01 20:09:20 244

原创 Leetcode算法学习日志-443 String Compression

Leetcode 443 String Compression题目原文Given an array of characters, compress it in-place.The length after compression must always be smaller than or equal to the original array.Every element of

2017-10-31 19:41:34 747

原创 Leetcode算法学习日志-86 Partition List

Leetcode 86 Partition List题目原文Given a linked list and a value x, partition it such that all nodes less thanx come before nodes greater than or equal to x.You should preserve the original rel

2017-10-30 21:50:11 220

原创 Leetcode算法学习日志-447 Number of Boomerangs

Leetcode 447 Number of Boomerangs题目原文Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points(i, j, k) such that the distance between i and j equals the d

2017-10-30 15:10:38 326

原创 Leetcode算法学习日志-152 Maximum Product Subarray

Leetcode 152 Maxinum Product Subarray题目原文Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],t

2017-10-28 15:12:51 276

原创 Leetcode算法学习日志-54 Spiral Matrix

Leetcode 54 Spiral Matrix题目原文Given a matrix of m x n elements (m rows,n columns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ],

2017-10-26 21:04:14 236

原创 Leetcode算法学习日志-60 Permutation Sequence

Leetcode 60 Permutation Sequence题目原文The set [1,2,3,…,n] contains a total ofn! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie

2017-10-26 11:12:51 236

原创 Leetcode算法学习日志-127 Word Ladder

Leetoce 127 Word Ladder题目原文Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence frombeginWord to endWord, such that:On

2017-10-26 10:38:30 509

原创 Leetcode算法学习日志-714 Best Time to Buy and Sell Stock with Transaction Fee

Leetcode 714 Best Time to Buy and Sell Stock with Transaction Fee题目原文Your are given an array of integers prices, for which thei-th element is the price of a given stock on day i; and a non-neg

2017-10-23 21:16:05 6173 1

原创 Leetcode算法学习日志-39 Combination Sum

Leetcode 39 Combination Sum题目原文Given a set of candidate numbers (C)(without duplicates) and a target number (T), find all unique combinations inC where the candidate numbers sums to T.Th

2017-10-20 09:21:55 264

原创 Leetcode算法学习日志-621 Task Scheduler

Leetcode 621 Task Scheduler题目原文Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks.Tasks could be done with

2017-10-12 15:25:48 1700

原创 Leetcode算法学习日志-452 Minimum Number of Arrows to Burst Balloons

Leetcode 452 Minimum Number of Arrows to Burst Balloons题目原文There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordin

2017-10-12 15:21:33 339

原创 Leetcode算法学习日志-406 Queue Reconstruction by Height

Leetcode 406 Queue Reconstruction by Height 题目原文Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers(h, k), where h is the height of the

2017-09-27 20:26:53 330

原创 Leetcode算法学习日志-455 Assign Cookies

Leetcode 455 Assign Coolies题目原文Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor g

2017-09-27 19:57:45 252

原创 Leetcode算法学习日志-122 Best Time to Buy and Sell Stock II

Leetcode 122 Best Time to Buy and Sell Stock II题目原文Say you have an array for which the ith element is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You m

2017-09-25 21:27:37 357

原创 Leetcode算法学习日志-647 Palindromic Substrings

Leetcode 647 Palindromic Substrings题目原文Given a string, your task is to count how many palindromic substrings in this string.The substrings with different start indexes or end indexes are count

2017-09-19 20:44:49 458

原创 Leetcode算法学习日志-680 valid Palindrome II

Leetcode-680 Valid Palindrome II题目原文

2017-09-18 16:16:23 2454

原创 C++中易记混知识点总结(长期更新)

C++中易记混知识点总结(长期更新)1、const指针和引用const int &a;//引用对象为const,但实际上只是a一厢情愿为const引用,应用对象可以为普通变量,但a仍不能改变其值(特别注意在函数形参中的使用)。const int *a;//指向常量的指针,和上面常量引用一样是一厢情愿,注意从右向左看,a首先是一个指针,指向一个const int。int *const a=&...

2017-09-14 20:45:42 2609

原创 Leetcode算法学习日志-673 Number of Longest Increasing Subsequence

Leetcode 673 Number of Longest Increasing Subsequence题目原文Given an unsorted array of integers, find the number of longest increasing subsequence.Example 1:Input: [1,3,5,4,7]Output: 2Expla

2017-09-13 15:56:27 1703

原创 Leetcode算法学习日志-576 Out of Boundary Paths

Leetcode 576 Out of Boundary Paths题目原文There is an m by n grid with a ball. Given the start coordinate(i,j) of the ball, you can move the ball to adjacent cell or cross the grid boundary in fou

2017-09-12 19:36:21 567

原创 Leetcode学习日志-376 Wiggle Subsequence

Leetcode 376 Wiggle Subsequence题目原文A sequence of numbers is called a wiggle sequence if the differences between successive numbers strictly alternate between positive and negative. The first dif

2017-09-07 20:41:37 434

原创 LeetCode算法学习日志-638 Shopping Offers

LeetCode 638 Shopping Offers题目原文In LeetCode Store, there are some kinds of items to sell. Each item has a price.However, there are some special offers, and a special offer consists of one or m

2017-09-03 20:09:12 1733 2

原创 Leetcode算法学习日志-338 Counting Bits

LeetCode 338 Counting Bits题目原文Given a non negative integer number num. For every numbersi in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as

2017-09-02 22:04:27 127

原创 Leetcode算法学习日志-70 Climbing Stairs

Leetcode 70 Climbing Stairs题目原文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 the t

2017-08-13 16:16:49 421

原创 Leetcode算法学习日志-121 Best Time to Buy and Sell Stock

Leetcode 121 Best Time to Buy and Sell Stock题目原文Say you have an array for which the ith element is the price of a given stock on dayi.If you were only permitted to complete at most one trans

2017-08-13 10:47:38 394

原创 Leetcode算法学习日志-321 Burst Balloons

Leetcode 321 Burst Balloons题目原文Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by arraynums. You are asked to burst all the balloons. If the

2017-08-02 14:59:51 614

原创 Leetcode算法学习日志 -240 Search a 2D Matrix 2

Leetcode 240 Search a 2D Matrix 2题目原文Write an efficient algorithm that searches for a value in anm x n matrix. This matrix has the following properties:Integers in each row are sorted in a

2017-07-31 10:14:38 316

原创 Leetcode算法学习日志-215 Kth Largest Element in an Array

Leetcode 215 Kth Largest Element in an Array题目原文Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For

2017-07-26 14:37:56 432

原创 Leetcode算法学习日志-53 Maximum Subarray

Leetcode 53 Maximum Subarray题目原文Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [-2,1,-3,4,-1,2,1,-5,4], the

2017-07-13 15:32:57 394

空空如也

空空如也

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

TA关注的人

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