
LeetCode
LeetCode 题目分析与结果
妙BOOK言
中山大学,计算机博士在读
展开
-
LeetCode 23. Merge k Sorted Lists
题目描述 出处https://leetcode.com/problems/merge-k-sorted-lists/description/Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.Example: Input: ...原创 2018-09-09 17:17:46 · 130 阅读 · 0 评论 -
LeetCode 64. Minimum Path Sum
目录题目描述分析最终结果题目描述出处 https://leetcode.com/problems/minimum-path-sum/Given 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 num...原创 2018-12-03 21:23:51 · 181 阅读 · 0 评论 -
LeetCode 32. Longest Valid Parentheses
目录题目描述分析最终结果题目描述出处 https://leetcode.com/problems/longest-valid-parentheses/Given a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parenthese...原创 2018-11-11 16:22:15 · 186 阅读 · 0 评论 -
LeetCode 316. Remove Duplicate Letters
目录题目描述分析最终结果题目描述出处 https://leetcode.com/problems/remove-duplicate-letters/Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only ...原创 2018-11-04 11:03:02 · 191 阅读 · 0 评论 -
LeetCode 55. Jump Game
目录题目描述分析最终结果题目描述出处 https://leetcode.com/problems/jump-game/description/Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the a...原创 2018-10-28 10:41:01 · 156 阅读 · 0 评论 -
LeetCode 134.Gas Station
目录题目描述分析最终结果题目描述出处 https://leetcode.com/problems/gas-stationThere are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas t...原创 2018-10-18 10:23:01 · 236 阅读 · 0 评论 -
LeetCode 72. Edit Distance
目录题目描述分析最终结果题目描述出处 https://leetcode.com/problems/edit-distance/Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2.You have the following 3 ...原创 2018-11-16 14:55:39 · 268 阅读 · 1 评论 -
LeetCode 315. Count of Smaller Numbers After Self
题目描述 出处https://leetcode.com/problems/count-of-smaller-numbers-after-self/description/You are given an integer array nums and you have to return a new counts array. The counts array has the prop...原创 2018-09-10 17:17:06 · 175 阅读 · 0 评论 -
LeetCode 310. Minimum Height Trees
目录题目描述分析最终结果题目描述出处 https://leetcode.com/problems/minimum-height-trees/description/For a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a ...原创 2018-09-23 15:46:43 · 185 阅读 · 0 评论 -
LeetCode 207. Course Schedule
目录题目描述分析最终结果题目描述出处 https://leetcode.com/problems/course-schedule/description/There are a total of n courses you have to take, labeled from 0 to n-1.Some courses may have prerequisites, for examp...原创 2018-09-29 16:55:04 · 176 阅读 · 0 评论 -
LeetCode 63. Unique Paths II
目录题目描述分析最终结果题目描述出处 https://leetcode.com/problems/unique-paths-ii/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 do...原创 2018-11-25 20:00:13 · 126 阅读 · 0 评论 -
LeetCode 210. Course Schedule II
目录题目描述分析最终结果题目描述出处 https://leetcode.com/problems/course-schedule-ii/description/There are a total of n courses you have to take, labeled from 0 to n-1.Some courses may have prerequisites, for ex...原创 2018-10-14 18:48:02 · 282 阅读 · 0 评论 -
LeetCode 765. Couples Holding Hands
目录题目描述分析最终结果题目描述出处 https://leetcode.com/problems/couples-holding-hands/description/N couples sit in 2N seats arranged in a row and want to hold hands. We want to know the minimum number of swaps ...原创 2018-10-06 18:35:23 · 322 阅读 · 0 评论 -
Leetcode 2 Add Two Numbers
Leetcode 2 Add Two Numbers题目描述You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single dig...原创 2018-09-05 13:47:38 · 120 阅读 · 0 评论 -
Leetcode 3 Longest Substring Without Repeating Characters
Leetcode 3 Longest Substring Without Repeating Characters题目描述 出处:https://leetcode.com/problems/longest-substring-without-repeating-charactersGiven a string, find the length of the longest s...原创 2018-09-05 22:05:34 · 129 阅读 · 0 评论