摘要:
Super Ugly NumberWrite a program to find the nthsuper ugly number.Super ugly numbers are positive numbers whose all prime factors are in the given pri... 阅读全文
摘要:
Permutations IIGiven a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2]have the follow... 阅读全文
摘要:
Next PermutationImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangemen... 阅读全文
摘要:
Burst BalloonsGivennballoons, indexed from0ton-1. Each balloon is painted with a number on it represented by arraynums. You are asked to burst all the... 阅读全文
摘要:
Minimum Height TreesFor a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Amon... 阅读全文
摘要:
LeetCode Problems List没有统计数量的功能,顺手写了一个。下面两段只是用jquery调整网页上显示的内容,刷新网页就没用了。比如想看题目里一共有多少Easy, Medium和Hard,就在浏览器Console中运行下面的代码。还有一种用法,比如看还有多少没做,或者没做的题中有多少... 阅读全文
摘要:
PermutationsGiven a collection of numbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3],[1,3,2],[2,1,3]... 阅读全文
摘要:
Range Sum Query - MutableGiven an integer arraynums, find the sum of the elements between indicesiandj(i≤j), inclusive.Theupdate(i, val)function modif... 阅读全文
摘要:
Additive NumberAdditive number is a positive integer whose digits can form additive sequence.A valid additive sequence should containat leastthree num... 阅读全文
摘要:
The Skyline ProblemA city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now s... 阅读全文