- 博客(18)
- 收藏
- 关注
原创 算法概论——课后习题8.3 (第十八周)
算法概论——课后习题8.3问题STINGY SAT is the following problem: given a set of clauses (each a disjunction of literals) and an integer k, and a satisfying assignment in which at most k variables are true, if
2018-01-08 16:12:10
216
原创 67. Add Binary(第十七周)
Description Add Binary - LeetCodeGiven two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".Solution只需要模拟我们正常手算二进制加法的过程即可。首先是确定输出的长度
2018-01-08 16:04:21
173
原创 45. Jump Game II(第十六周)
Description Jump Game II - LeetCodeGiven 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
2018-01-08 15:37:29
166
原创 236. Lowest Common Ancestor of a Binary Tree(第十五周)
Description Lowest Common Ancestor of a Binary Tree - LeetCodeGiven a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to the definition of LCA on W
2018-01-08 15:07:56
170
原创 347. Top K Frequent Elements (第十四周)
Top K Frequent Elements - LeetCodeGiven a non-empty array of integers, return the k most frequent elements.For example, Given [1,1,1,2,2,3] and k = 2, return [1,2].Note: You may assume
2017-12-13 00:58:59
146
原创 238. Product of Array Except Self(第十三周)
Product of Array Except Self - LeetCodeGiven an array of n integers where n > 1,nums, return an array output such that output[i] is equal to the product of all the elements of nums excep
2017-12-12 23:35:56
130
原创 451. Sort Characters By Frequency(第十二周)
Sort Characters By Frequency - LeetCode
2017-12-12 23:06:50
139
原创 121. Best Time to Buy and Sell Stock(第十一周)
Best Time to Buy and Sell Stock - LeetCode
2017-11-22 20:45:20
179
原创 415. Add Strings(第十周)
Add Strings - LeetCodeGiven two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2.Note:The length of both num1 and num2 is < 5100.
2017-11-12 01:12:44
160
原创 717. 1-bit and 2-bit Characters(第九周)
1-bit and 2-bit Characters - LeetCodeWe have two special characters. The first character can be represented by one bit 0. The second character can be represented by two bits (10 or 11).
2017-11-06 20:21:22
149
原创 217. Contains Duplicate(第八周)
Contains Duplicate - LeetCodeGiven an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array.
2017-10-30 22:26:33
121
原创 74. Search a 2D Matrix(第七周)
Search a 2D Matrix - LeetCodeWrite an efficient algorithm that searches for a value in an m x n matrix.
2017-10-23 01:20:10
227
原创 66. Plus One(第六周)
Plus One - LeetCodeGiven a non-negative integer represented as a non-empty array of digits, plus one to the integer.
2017-10-16 01:26:43
262
原创 58. Length of Last Word(第五周)
Length of Last Word - LeetCodeGiven a string s consists of upper/lower-case alphabets and empty space characters ’ ‘, return the length of last word in the string.For example, Given s = `"Hello World"`,retu
2017-10-08 16:16:38
123
原创 344. Reverse String(第四周)
Description Reverse String - LeetCodeWrite a function that takes a string as input and returns the string reversed.Example: Given s = “hello”, return “olleh”.
2017-10-02 14:22:47
115
原创 75. Sort Colors(第三周)
Description Sort Colors - LeetCodeGiven 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
2017-09-24 18:00:02
307
原创 12.Integer to Roman (第二周)
Integer to Roman - LeetCodeGiven an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.Input: 1 Output: "I"
2017-09-13 23:07:44
181
原创 13. Roman to Integer (第一周)
Roman to Integer - LeetCodeGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.Input: "DCXXI" Output: 621Solution
2017-09-10 16:50:54
306
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人