Given two words (beginWord and endWord), and a dictionary’s word list, find the length of shortest trans…
Leetcode 163. Missing Ranges
Given a sorted integer array where the range of elements are in the inclusive range [lower, upper], return its…
Leetcode 128. Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example…
Leetcode 65. Valid Number
Validate if a given string is numeric. Some examples: “0” => true ” 0.1 ” => tru…
Leetcode 126. Word Ladder II
Given two words (beginWord and endWord), and a dictionary’s word list, find all shortest transformation …
Leetcode 78. Subsets
Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not contain d…
Leetcode 139. Word Break
Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can …
Leetcode 179. Largest Number
Given a list of non negative integers, arrange them such that they form the largest number. For example, given…
Leetcode 99. Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its struc…
Leetcode 146. LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following ope…
Leetcode 218. The Skyline Problem
原题描述很长,此处放链接:https://leetcode.com/problems/the-skyline-problem/description/ 思路: 题目要求所有建筑行程的轮廓,并且给出高度变化的点即可。 暴力…
Leetcode 211. Add and Search Word - Data structure design
Design a data structure that supports the following two operations: void addWord(word) bool search(word) searc…