- 博客(35)
- 资源 (29)
- 收藏
- 关注
原创 LeetCode --- 80. Remove Duplicates from Sorted Array II
题目链接:Remove Duplicates from Sorted Array IIFollow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array A = [1,1,1,2,2,3],Your function sho
2015-03-23 21:29:16 1054
原创 LeetCode --- 79. Word Search
题目链接:Word SearchGiven a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontal
2015-03-23 21:28:57 664
原创 LeetCode --- 78. Subsets
题目链接:SubsetsGiven a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.For
2015-03-23 21:27:40 799
原创 LeetCode --- 77. Combinations
题目链接:CombinationsGiven two integers n and k, return all possible combinations of k numbers out of 1 ... n.For example,If n = 4 and k = 2, a solution is:[ [2,4], [3,4], [2,3], [1,
2015-03-23 21:26:44 756
原创 LeetCode --- 76. Minimum Window Substring
题目链接:Minimum Window SubstringGiven a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S = "ADOBECODEBANC"T = "ABC
2015-03-23 21:26:09 2946
原创 LeetCode --- 75. Sort Colors
题目链接:Sort ColorsGiven an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will u
2015-03-20 21:52:04 822
原创 LeetCode --- 74. Search a 2D Matrix
题目链接:Search a 2D MatrixWrite an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted from left to right.The
2015-03-20 21:51:15 704
原创 LeetCode --- 73. Set Matrix Zeroes
题目链接:Set Matrix ZeroesGiven a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.Follow up:Did you use extra space?A straight forward solution using O(mn) spa
2015-03-20 21:50:38 1954
原创 LeetCode --- 72. Edit Distance
题目链接:Edit DistanceGiven two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the following 3 operations pe
2015-03-20 21:47:11 770
原创 LeetCode --- 71. Simplify Path
题目链接:Simplify PathGiven an absolute path for a file (Unix-style), simplify it.For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c"Corner Cases:Did you consider the ca
2015-03-20 21:46:14 6746
原创 LeetCode --- 70. Climbing Stairs
题目链接:Climbing StairsYou 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 top?这道题的要求是爬n阶
2015-03-19 21:58:02 930 2
原创 LeetCode --- 69. Sqrt(x)
题目链接:Sqrt(x)Implement int sqrt(int x).Compute and return the square root of x.这道题的要求是实现int sqrt(int x),即计算x的平方根。考虑二分,即先令l和r分别为1和x/2+1(x的平方根一定小于等于x/2+1),然后m等于(l+r)/2,不断比较m*m和x的大小。由于
2015-03-19 21:57:17 778
原创 LeetCode --- 68. Text Justification
题目链接:Text JustificationGiven an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.You should pack your words in a
2015-03-19 21:54:38 861
原创 LeetCode --- 67. Add Binary
题目链接:Add BinaryGiven two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".这道题的要求是两个二进制字符串加法运算。简单的大数加法,只不过是二进制的。处理进位的时候,按照二进制处理即可。时间复杂度
2015-03-19 21:54:04 1406
原创 LeetCode --- 66. Plus One
题目链接:Plus OneGiven a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.这道题的要求是给定
2015-03-19 21:53:21 10084
原创 LeetCode --- 65. Valid Number
题目链接:Valid NumberValidate if a given string is numeric.Some examples:"0" => true " 0.1 " => true "abc" => false "1 a" => false "2e10" => true Note: It is intended for the problem stat
2015-03-15 23:34:37 779
原创 LeetCode --- 64. Minimum Path Sum
题目链接:Minimum Path SumGiven a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only move ei
2015-03-15 23:33:59 744
原创 LeetCode --- 63. Unique Paths II
题目链接:Unique Paths IIFollow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 0 resp
2015-03-15 23:33:14 667
原创 LeetCode --- 61. Rotate List
题目链接:Rotate ListGiven a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL. 这道题的要求是向右旋转链表
2015-03-15 23:33:07 1307
原创 LeetCode --- 62. Unique Paths
题目链接:Unique PathsA 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. The robot is try
2015-03-15 23:32:37 633
原创 LeetCode --- 60. Permutation Sequence
题目链接:Permutation SequenceThe set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie, for n = 3):
2015-03-14 23:18:23 788
原创 LeetCode --- 59. Spiral Matrix II
题目链接:Spiral Matrix IIGiven an integer n, generate a square matrix filled with elements from 1 to n^2 in spiral order.For example,Given n = 3,You should return the following matrix:[ [ 1,
2015-03-14 23:16:43 695
原创 LeetCode --- 58. Length of Last Word
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 last word does not exist, return 0.Note: A word is defin
2015-03-14 23:13:27 728
原创 LeetCode --- 57. Insert Interval
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to their start times.Examp
2015-03-14 23:10:32 2217
原创 LeetCode --- 56. Merge Intervals
题目链接:Merge IntervalsGiven a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[15,18]. 这道题的要求是将给定的一组间隔中有重叠的进行合并。
2015-03-14 23:03:47 1399
原创 LeetCode --- 55. Jump Game
题目链接:Jump GameGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.
2015-03-12 10:31:10 1108
原创 LeetCode --- 54. Spiral Matrix
题目链接:Spiral MatrixGiven 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 ], [ 4, 5, 6
2015-03-12 10:30:35 605
原创 LeetCode --- 53. Maximum Subarray
题目链接:Maximum SubarrayFind 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 contiguous s
2015-03-07 10:50:54 668
原创 LeetCode --- 52. N-Queens II
题目链接:N-Queens IIFollow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.这道题的要求是返回N皇后问题总共有多少不同情况。和N-Queens问题一样,同样的思路,至少这个是统计数量
2015-03-07 10:49:08 1506
原创 LeetCode --- 51. N-Queens
题目链接:N-QueensThe n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return all distinct solutions to the n-queens
2015-03-07 10:46:41 2620
原创 LeetCode --- 50. Pow(x, n)
题目链接:Pow(x, n)Implement pow(x, n).这道题的要求是实现pow(x, n)函数。求x的n次幂。直接的暴力思路,将x乘以自身n次即可,时间复杂度O(n)。当n非常大时,计算时间过长。考虑将n转化为二进制数,即n = a0*2^0 + a1*2^1 + a2*2^2 + ... + an*2^n。而求x的n次幂,即为x^n = x^(a0*2^0 + a1
2015-03-04 10:13:30 827
原创 LeetCode --- 49. Anagrams
题目链接:AnagramsGiven an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.这道题的要求是给定字符串数组,返回能构成异构的所有字符串。anagram,即异构,意思是指由颠倒字母顺序组成的单词,比如“live”
2015-03-04 10:12:28 716
原创 LeetCode --- 48. Rotate Image
题目链接:Rotate ImageYou are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?这道题的要求是将n*n的矩阵顺时针旋转90°,要求原地旋转,即不申请额外空间
2015-03-03 10:00:43 1088
原创 LeetCode --- 47. Permutations II
题目链接:Permutations IIGiven a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the following unique permutations: [1,1,2], [
2015-03-03 09:59:55 759
原创 LeetCode --- 46. Permutations
题目链接:PermutationsGiven a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1].
2015-03-03 09:58:41 702
Codeblocks 12.11 汉化
2013-12-21
2013中国大数据技术大会PPT——Big Data in Cloud
2013-12-13
2013中国大数据技术大会PPT——中国移劢大数据应用实践
2013-12-12
2013中国大数据技术大会PPT——腾讯大规模Hadoop集群实践
2013-12-12
2013中国大数据技术大会PPT——阿里搜索流计算技术
2013-12-12
2013中国大数据技术大会PPT——阿里大数据应用平台
2013-12-12
2013中国大数据技术大会PPT
2013-12-12
2013中国大数据技术大会PPT——360超大规模HBASE集群的改进
2013-12-12
Hadoop技术内幕:深入解析YARN架构设计与实现原理.迷你书
2013-12-12
hadoop集群建立
2013-09-16
VMsvga2 v1.2.3
2011-11-20
J2EE_Tutorial_中文版
2011-07-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人