题目 Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums…
分类:LeetCode
[LeetCode] Number of Longest Increasing Subsequence 最长递增序列的个数
Given an unsorted array of integers, find the number of longest increasing subsequence. Example 1: Inpu…
[LeetCode] Prefix and Suffix Search 前后缀搜索
Given many words, words[i] has weight i. Design a class WordFilter that supports one function, WordFilt…
LeetCode 205 Isomorphic Strings
题目描述 Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters…
Leetcode讲解视频(持续更新中...)
【Leetcode】146.LRU缓存机制【Leetcode】108.将有序数组转换为二叉搜索树【Leetcode】107.二叉树的层次遍历【Leetcode】106. 从中序与后序遍历序列构造二叉树【Leetcode】…
[Leetcode] Gas Station 加油站
Gas Station There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. Y…
[Leetcode] Factorial Trailing Zeroes 末尾零
Factorial Trailing Zeroes Given an integer n, return the number of trailing zeroes in n!. Note: Your solution …
[Leetcode] Graph Valid Tree 图与树
Graph Valid Tree Given n nodes labeled from 0 to n – 1 and a list of undirected edges (each edge is a pa…
【leetcode】146. LRU Cache LRU淘汰规则的kv hash容器
1. 题目 Design and implement a data structure for Least Recently Used (LRU) cache. It should support the followi…
LeetCode 280. Wiggle Sort II
Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] <= nums[3]&…
Leetcode 214. Shortest Palindrome
Given a string S, you are allowed to convert it to a palindrome by adding characters in front of it. Find and …
Leetcode 179. Largest Number
Given a list of non negative integers, arrange them such that they form the largest number. For example, given…