摘要:https://leetcode.com/problems/powx-n/ Implement pow(x, n), which calculates x raised to the power n (xn). Example 1: Example 2: Example 3: Note: -100.
阅读全文
随笔分类 - LeetCode
摘要:https://leetcode.com/problems/decode-ways/ A message containing letters from A-Z is being decoded to numbers using the following mapping: Given an dec
阅读全文
摘要:https://leetcode.com/problems/unique-binary-search-trees-ii/Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n...
阅读全文
摘要:https://leetcode.com/problems/min-stack/ Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) --
阅读全文
摘要:https://leetcode.com/problems/word-ladder-ii/Given two words (startandend), and a dictionary, find all shortest transformation sequence(s) fromstartto...
阅读全文
摘要:https://leetcode.com/problems/word-ladder/ Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from
阅读全文
摘要:https://leetcode.com/problems/sudoku-solver/Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the chara...
阅读全文
摘要:https://leetcode.com/problems/n-queens-ii/Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of dist...
阅读全文
摘要:https://leetcode.com/problems/n-queens/Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each othe...
阅读全文
摘要:https://leetcode.com/problems/maximum-gap/ Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Tr
阅读全文
摘要:https://leetcode.com/problems/palindrome-partitioning-ii/ Given a string s, partition s such that every substring of the partition is a palindrome. Re
阅读全文
摘要:https://leetcode.com/problems/palindrome-partitioning/ Given a string s, partition s such that every substring of the partition is a palindrome. Retur
阅读全文
摘要:https://leetcode.com/problems/simplify-path/Given an absolute path for a file (Unix-style), simplify it.Given an absolute path for a file (Unix-style)...
阅读全文
摘要:https://leetcode.com/problems/longest-valid-parentheses/ Given a string containing just the characters '(' and ')', find the length of the longest val
阅读全文
摘要:https://leetcode.com/problems/permutations-ii/ Given a collection of numbers that might contain duplicates, return all possible unique permutations. F
阅读全文
摘要:https://leetcode.com/problems/insert-interval/ Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary)
阅读全文
摘要:https://leetcode.com/problems/merge-intervals/Given a collection of intervals, merge all overlapping intervals.For example,Given[1,3],[2,6],[8,10],[15...
阅读全文
摘要:https://leetcode.com/problems/first-missing-positive/Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]...
阅读全文
摘要:https://leetcode.com/problems/copy-list-with-random-pointer/A linked list is given such that each node contains an additional random pointer which cou...
阅读全文
摘要:https://leetcode.com/problems/regular-expression-matching/Implement regular expression matching with support for'.'and'*'.'.' Matches any single chara...
阅读全文

浙公网安备 33010602011771号