- 博客(328)
- 资源 (21)
- 问答 (1)
- 收藏
- 关注
原创 LeetCode: 327. Count of Range Sum
LeetCode: 327. Count of Range SumGiven an integer array nums, return the number of range sums that lie in [lower, upper] inclusive.Range sum S(i, j) is defined as the sum of the elements in nums bet...
2019-11-19 08:37:39 216
原创 LeetCode:324. Wiggle Sort II
LeetCode:324. Wiggle Sort II题目描述Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3]…Example 1:Input: nums = [1, 5, 1, 1, 6, 4]Output: One possible an...
2019-11-17 08:12:13 167
原创 LeetCode: 322. Coin Change
LeetCode: 322. Coin Change题目描述You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that ...
2019-11-13 08:08:10 145
原创 LeetCode: 321. Create Maximum Number
LeetCode: 321. Create Maximum Number题目描述Given two arrays of length m and n with digits 0-9 representing two numbers. Create the maximum number of length k <= m + n from digits of the two. The rel...
2019-11-12 08:46:08 197
原创 LeetCode: 319. Bulb Switcher
[LeetCode: 319. Bulb Switcher](LeetCode: 319. Bulb Switcher)题目描述There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, y...
2019-11-10 19:41:59 199
原创 LeetCode: 318. Maximum Product of Word Lengths
LeetCode: 318. Maximum Product of Word Lengths题目描述Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may ass...
2019-11-09 10:03:42 154
原创 LeetCode: 316. Remove Duplicate Letters
LeetCode: 316. Remove Duplicate Letters题目描述Given a string which contains only lowercase letters, remove duplicate letters so that every letter appears once and only once. You must make sure your res...
2019-11-08 09:31:10 187
原创 LeetCode: 315. Count of Smaller Numbers After Self
LeetCode: 315. Count of Smaller Numbers After Self题目描述You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number o...
2019-11-07 07:45:41 167
原创 LeetCode: 313. Super Ugly Number
LeetCode: 313. Super Ugly NumberWrite a program to find the nth super ugly number.Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes of size k.Exampl...
2019-11-06 08:19:51 221
原创 LeetCode: 312. Burst Balloons
LeetCode: 312. Burst Balloons题目描述Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloons. If the you b...
2019-11-05 08:08:39 179
原创 LeetCode: 310. Minimum Height Trees
LeetCode: 310. Minimum Height Trees题目描述For an undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all possible rooted trees,...
2019-11-02 10:56:53 148
原创 LeetCode: 309. Best Time to Buy and Sell Stock with Cooldown
LeetCode: 309. Best Time to Buy and Sell Stock with Cooldown题目描述Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit...
2019-10-29 11:23:57 123
原创 LeetCode: 307. Range Sum Query - Mutable
LeetCode: 307. Range Sum Query - Mutable题目描述Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.The update(i, val) function modifies nums by updatin...
2019-10-28 19:40:01 125
原创 LeetCode: 306. Additive Number
LeetCode: 306. Additive Number题目描述Additive number is a string whose digits can form additive sequence.A valid additive sequence should contain at least three numbers. Except for the first two numbe...
2019-10-26 12:48:45 166
原创 LeetCode: 304. Range Sum Query 2D - Immutable
LeetCode: 304. Range Sum Query 2D - Immutable题目描述Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row...
2019-10-25 22:02:30 109
原创 LeetCode: 303. Range Sum Query - Immutable
LeetCode: 303. Range Sum Query - Immutable题目描述Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.Example:Given nums = [-2, 0, 3, -5, 2, -1]sumRa...
2019-10-24 13:57:27 172
原创 LeetCode: 301. Remove Invalid Parentheses
LeetCode: 301. Remove Invalid Parentheses题目描述Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results.**Note: **The input string may con...
2019-10-24 11:27:57 132
原创 LeetCode: 300. Longest Increasing Subsequence
LeetCode: 300. Longest Increasing Subsequence题目描述Given an unsorted array of integers, find the length of longest increasing subsequence.Example:Input: [10,9,2,5,3,7,101,18]Output: 4 Explanation:...
2019-10-23 15:31:06 147
原创 LeetCode: 299. Bulls and Cows
LeetCode: 299. Bulls and Cows题目描述You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time your friend ma...
2019-10-23 14:32:33 197
原创 LeetCode: 297. Serialize and Deserialize Binary Tree
LeetCode: 297. Serialize and Deserialize Binary Tree题目描述ShareSerialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memo...
2019-10-23 10:26:47 163
原创 LeetCode: 290. Word Pattern
LeetCode: 290. Word Pattern题目描述Given a pattern and a string str, find if str follows the same pattern.Here follow means a full match, such that there is a bijection between a letter in pattern and ...
2019-10-22 07:18:22 127
原创 LeetCode: 289. Game of Life
LeetCode: 289. Game of Life题目描述According to the Wikipedia’s article: “The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in ...
2019-10-21 18:20:27 306
原创 LeetCode: 287. Find the Duplicate Number
LeetCode: 287. Find the Duplicate Number题目描述Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assu...
2019-10-21 10:28:36 121
原创 刷 LeetCode 从零开始学 GoLang(结束语)
该专栏结束,后续会在 杨领well的 LeetCode 题解专栏 继续更新 LeetCode 题解
2019-10-19 21:26:36 128
原创 LeetCode:282. Expression Add Operators
LeetCode:282. Expression Add Operators题目描述Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the digits ...
2019-10-19 21:07:34 102
原创 LeetCode:295. Find Median from Data Stream
LeetCode:295. Find Median from Data Stream题目描述Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two m...
2019-10-18 18:21:27 160
原创 刷 LeetCode 从零开始学 GoLang(11):35. Search Insert Position
题目描述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.You may assume no duplicates in the arra...
2019-10-18 10:29:12 144
原创 刷 LeetCode 从零开始学 GoLang(10):242. Valid Anagram
题目描述Given two strings s and t , write a function to determine if t is an anagram of s.Example 1:Input: s = "anagram", t = "nagaram"Output: trueExample 2:Input: s = "rat", t = "car"Output: fals...
2019-10-17 10:10:56 98
原创 刷 LeetCode 从零开始学 GoLang(9): 27. Remove Element
题目描述Given an array nums and a value val, remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must do this by modifying the input ...
2019-10-16 09:42:48 117
原创 刷 LeetCode 从零开始学 GoLang(8):26. Remove Duplicates from Sorted Array
题目描述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 do this by mod...
2019-10-15 09:45:31 137
原创 刷 LeetCode 从零开始学 GoLang(7):21. Merge Two Sorted Lists
题目描述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.Example:Input: 1->2->4, 1->3->4Output: ...
2019-10-14 09:47:00 119
原创 刷 LeetCode 从零开始学 GoLang(6): 20. Valid Parentheses
题目描述Given a string containing just the characters ‘(’, ‘)’, ‘{’, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.An input string is valid if:Open brackets must be closed by the same type o...
2019-10-13 15:20:08 132
原创 刷 LeetCode 从零开始学 GoLang(5):14. Longest Common Prefix
题目描述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 “”.Example 1:Input: ["flower","flow","flight"]Output...
2019-10-12 21:57:13 195
原创 刷 LeetCode 从零开始学 GoLang(4):13. Roman to Integer
题目描述Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X 10L 50C 100D ...
2019-10-11 09:22:31 124
原创 刷 LeetCode 从零开始学 GoLang(3):9. Palindrome Number
题目描述Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.Example 1:Input: 121Output: trueExample 2:Input: -121Output: falseExpla...
2019-10-10 09:25:05 129
原创 刷 LeetCode 从零开始学 GoLang(2):7. Reverse Integer
题目描述Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:Assume we are dealing ...
2019-10-09 10:25:42 112
原创 刷 LeetCode 从零开始学 GoLang(1):1. Two Sum
题目描述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 exactly one solution, and you may not use the s...
2019-10-08 07:03:36 121
原创 LeetCode: 284. Peeking Iterator
LeetCode: 284. Peeking Iterator题目描述Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the peek() operation – it essentially pee...
2019-03-19 11:34:04 227
原创 LeetCode: 264. Ugly Number II
LeetCode: 264. Ugly Number II题目描述Write a program to find the n-th ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5.Example:Input: n = 10Output: 12Explanati...
2019-03-18 13:16:34 189
原创 LeetCode: 263. Ugly Number
LeetCode: 263. Ugly Number题目描述Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5.Example 1:Input: 6Outpu...
2019-03-13 08:06:21 120
跟我一起写 Makefile
2018-07-14
Gnu标准的make文档
2018-07-14
The Vim Tutorial and Reference By Steve Oualline
2017-12-20
Objective-C程序设计 第四版 高清
2017-12-07
The Transport Layer Security (TLS) Protocol V1.1
2017-08-25
The_C++_Programming_Language,Special_Edition.
2016-07-09
关于函数模板的问题,有点点没有看懂。
2016-03-21
TA创建的收藏夹 TA关注的收藏夹
TA关注的人