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 · 89 阅读 · 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 · 91 阅读 · 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 · 100 阅读 · 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 · 107 阅读 · 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 · 94 阅读 · 0 评论 -
LeetCode 134.Gas Station
目录题目描述分析最终结果 题目描述 出处 https://leetcode.com/problems/gas-station There 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 · 152 阅读 · 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 · 145 阅读 · 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 · 137 阅读 · 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 · 86 阅读 · 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 · 93 阅读 · 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 · 94 阅读 · 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 · 210 阅读 · 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 · 203 阅读 · 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 · 89 阅读 · 0 评论 -
Leetcode 3 Longest Substring Without Repeating Characters
Leetcode 3 Longest Substring Without Repeating Characters 题目描述 出处:https://leetcode.com/problems/longest-substring-without-repeating-characters Given a string, find the length of the longest s...原创 2018-09-05 22:05:34 · 103 阅读 · 0 评论