From db4ab6c6616a8c5a918622dc30e4766ccef28594 Mon Sep 17 00:00:00 2001 From: openset Date: Tue, 19 Feb 2019 10:56:47 +0800 Subject: [PATCH] Add: Navigation --- problems/increasing-subsequences/README.md | 4 ++++ problems/is-graph-bipartite/README.md | 4 ++++ problems/k-th-smallest-in-lexicographical-order/README.md | 4 ++++ problems/license-key-formatting/README.md | 4 ++++ problems/lonely-pixel-ii/README.md | 4 ++++ problems/longest-palindromic-subsequence/README.md | 4 ++++ problems/longest-uncommon-subsequence-ii/README.md | 4 ++++ problems/maximum-average-subarray-ii/README.md | 4 ++++ problems/maximum-depth-of-n-ary-tree/README.md | 4 ++++ problems/maximum-product-of-three-numbers/README.md | 4 ++++ problems/maximum-size-subarray-sum-equals-k/README.md | 4 ++++ problems/maximum-xor-of-two-numbers-in-an-array/README.md | 4 ++++ problems/minesweeper/README.md | 4 ++++ problems/mini-parser/README.md | 4 ++++ problems/minimum-factorization/README.md | 4 ++++ problems/minimum-moves-to-equal-array-elements/README.md | 4 ++++ problems/minimum-unique-word-abbreviation/README.md | 4 ++++ problems/most-frequent-subtree-sum/README.md | 4 ++++ problems/move-zeroes/README.md | 4 ++++ problems/moving-average-from-data-stream/README.md | 4 ++++ problems/n-ary-tree-level-order-traversal/README.md | 4 ++++ problems/n-ary-tree-postorder-traversal/README.md | 4 ++++ problems/n-ary-tree-preorder-traversal/README.md | 4 ++++ problems/nested-list-weight-sum-ii/README.md | 4 ++++ problems/next-greater-element-i/README.md | 4 ++++ problems/next-greater-element-ii/README.md | 4 ++++ problems/next-greater-element-iii/README.md | 4 ++++ problems/non-overlapping-intervals/README.md | 4 ++++ problems/not-boring-movies/README.md | 4 ++++ problems/number-complement/README.md | 4 ++++ problems/number-of-boomerangs/README.md | 4 ++++ .../README.md | 4 ++++ problems/number-of-islands-ii/README.md | 4 ++++ problems/number-of-segments-in-a-string/README.md | 4 ++++ problems/odd-even-linked-list/README.md | 4 ++++ problems/ones-and-zeroes/README.md | 4 ++++ problems/optimal-division/README.md | 4 ++++ problems/output-contest-matches/README.md | 4 ++++ problems/pacific-atlantic-water-flow/README.md | 4 ++++ problems/palindromic-substrings/README.md | 4 ++++ problems/partition-equal-subset-sum/README.md | 4 ++++ problems/path-sum-iii/README.md | 4 ++++ problems/perfect-number/README.md | 4 ++++ problems/perfect-rectangle/README.md | 4 ++++ problems/plus-one-linked-list/README.md | 4 ++++ problems/poor-pigs/README.md | 4 ++++ problems/power-of-four/README.md | 4 ++++ problems/power-of-three/README.md | 4 ++++ problems/power-of-two/README.md | 4 ++++ problems/predict-the-winner/README.md | 4 ++++ problems/product-of-array-except-self/README.md | 4 ++++ problems/quad-tree-intersection/README.md | 4 ++++ problems/queue-reconstruction-by-height/README.md | 4 ++++ problems/random-flip-matrix/README.md | 4 ++++ problems/random-pick-index/README.md | 4 ++++ problems/random-pick-with-weight/README.md | 4 ++++ problems/random-point-in-non-overlapping-rectangles/README.md | 4 ++++ problems/range-addition-ii/README.md | 4 ++++ problems/range-addition/README.md | 4 ++++ problems/range-sum-query-2d-immutable/README.md | 4 ++++ problems/range-sum-query-2d-mutable/README.md | 4 ++++ problems/range-sum-query-immutable/README.md | 4 ++++ problems/range-sum-query-mutable/README.md | 4 ++++ problems/ransom-note/README.md | 4 ++++ problems/rearrange-string-k-distance-apart/README.md | 4 ++++ problems/reconstruct-itinerary/README.md | 4 ++++ problems/reconstruct-original-digits-from-english/README.md | 4 ++++ problems/relative-ranks/README.md | 4 ++++ problems/remove-boxes/README.md | 4 ++++ problems/reshape-the-matrix/README.md | 4 ++++ problems/reverse-pairs/README.md | 4 ++++ problems/reverse-string-ii/README.md | 4 ++++ problems/reverse-string/README.md | 4 ++++ problems/reverse-vowels-of-a-string/README.md | 4 ++++ problems/reverse-words-in-a-string-iii/README.md | 4 ++++ problems/rotate-function/README.md | 4 ++++ problems/self-crossing/README.md | 4 ++++ problems/shortest-distance-in-a-plane/README.md | 4 ++++ problems/shortest-unsorted-continuous-subarray/README.md | 4 ++++ problems/shortest-word-distance-iii/README.md | 4 ++++ problems/single-element-in-a-sorted-array/README.md | 4 ++++ problems/single-number-iii/README.md | 4 ++++ problems/sort-colors/README.md | 4 ++++ problems/sum-of-square-numbers/README.md | 4 ++++ problems/swap-salary/README.md | 4 ++++ problems/tag-validator/README.md | 4 ++++ problems/target-sum/README.md | 4 ++++ problems/task-scheduler/README.md | 4 ++++ problems/the-maze-ii/README.md | 4 ++++ problems/total-hamming-distance/README.md | 4 ++++ problems/wiggle-subsequence/README.md | 4 ++++ problems/winning-candidate/README.md | 4 ++++ problems/word-break-ii/README.md | 4 ++++ problems/word-ladder/README.md | 4 ++++ problems/word-pattern/README.md | 4 ++++ 95 files changed, 380 insertions(+) diff --git a/problems/increasing-subsequences/README.md b/problems/increasing-subsequences/README.md index 3a04f0c71..f51de35ef 100644 --- a/problems/increasing-subsequences/README.md +++ b/problems/increasing-subsequences/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/the-maze "The Maze") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/construct-the-rectangle "Construct the Rectangle") + ## 491. Increasing Subsequences (Medium)

diff --git a/problems/is-graph-bipartite/README.md b/problems/is-graph-bipartite/README.md index 595d0f0c9..23015379c 100644 --- a/problems/is-graph-bipartite/README.md +++ b/problems/is-graph-bipartite/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/letter-case-permutation "Letter Case Permutation") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/k-th-smallest-prime-fraction "K-th Smallest Prime Fraction") + ## 785. Is Graph Bipartite? (Medium)

Given an undirected graph, return true if and only if it is bipartite.

diff --git a/problems/k-th-smallest-in-lexicographical-order/README.md b/problems/k-th-smallest-in-lexicographical-order/README.md index 8a957bde7..a736d1a4e 100644 --- a/problems/k-th-smallest-in-lexicographical-order/README.md +++ b/problems/k-th-smallest-in-lexicographical-order/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/ternary-expression-parser "Ternary Expression Parser") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/arranging-coins "Arranging Coins") + ## 440. K-th Smallest in Lexicographical Order (Hard)

Given integers n and k, find the lexicographically k-th smallest integer in the range from 1 to n.

diff --git a/problems/license-key-formatting/README.md b/problems/license-key-formatting/README.md index cb6c2d34e..8edb841ed 100644 --- a/problems/license-key-formatting/README.md +++ b/problems/license-key-formatting/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/magical-string "Magical String") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/smallest-good-base "Smallest Good Base") + ## 482. License Key Formatting (Easy)

You are given a license key represented as a string S which consists only alphanumeric character and dashes. The string is separated into N+1 groups by N dashes.

diff --git a/problems/lonely-pixel-ii/README.md b/problems/lonely-pixel-ii/README.md index 602ae9c2f..e96b3873e 100644 --- a/problems/lonely-pixel-ii/README.md +++ b/problems/lonely-pixel-ii/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/k-diff-pairs-in-an-array "K-diff Pairs in an Array") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/encode-and-decode-tinyurl "Encode and Decode TinyURL") + ## 533. Lonely Pixel II (Medium) diff --git a/problems/longest-palindromic-subsequence/README.md b/problems/longest-palindromic-subsequence/README.md index d920a145f..731d6f69f 100644 --- a/problems/longest-palindromic-subsequence/README.md +++ b/problems/longest-palindromic-subsequence/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/find-largest-value-in-each-tree-row "Find Largest Value in Each Tree Row") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/super-washing-machines "Super Washing Machines") + ## 516. Longest Palindromic Subsequence (Medium)

diff --git a/problems/longest-uncommon-subsequence-ii/README.md b/problems/longest-uncommon-subsequence-ii/README.md index d63ec7350..7423bcdd7 100644 --- a/problems/longest-uncommon-subsequence-ii/README.md +++ b/problems/longest-uncommon-subsequence-ii/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/longest-uncommon-subsequence-i "Longest Uncommon Subsequence I ") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/continuous-subarray-sum "Continuous Subarray Sum") + ## 522. Longest Uncommon Subsequence II (Medium)

diff --git a/problems/maximum-average-subarray-ii/README.md b/problems/maximum-average-subarray-ii/README.md index 8a860e171..fa650f936 100644 --- a/problems/maximum-average-subarray-ii/README.md +++ b/problems/maximum-average-subarray-ii/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/maximum-average-subarray-i "Maximum Average Subarray I") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/set-mismatch "Set Mismatch") + ## 644. Maximum Average Subarray II (Hard) diff --git a/problems/maximum-depth-of-n-ary-tree/README.md b/problems/maximum-depth-of-n-ary-tree/README.md index 3158b7163..ef3469382 100644 --- a/problems/maximum-depth-of-n-ary-tree/README.md +++ b/problems/maximum-depth-of-n-ary-tree/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/quad-tree-intersection "Quad Tree Intersection") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/subarray-sum-equals-k "Subarray Sum Equals K") + ## 559. Maximum Depth of N-ary Tree (Easy)

Given a n-ary tree, find its maximum depth.

diff --git a/problems/maximum-product-of-three-numbers/README.md b/problems/maximum-product-of-three-numbers/README.md index 39621c59d..100d7ef21 100644 --- a/problems/maximum-product-of-three-numbers/README.md +++ b/problems/maximum-product-of-three-numbers/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/swap-salary "Swap Salary") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/k-inverse-pairs-array "K Inverse Pairs Array") + ## 628. Maximum Product of Three Numbers (Easy)

Given an integer array, find three numbers whose product is maximum and output the maximum product.

diff --git a/problems/maximum-size-subarray-sum-equals-k/README.md b/problems/maximum-size-subarray-sum-equals-k/README.md index 8b45defc7..fc3ecb5a3 100644 --- a/problems/maximum-size-subarray-sum-equals-k/README.md +++ b/problems/maximum-size-subarray-sum-equals-k/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/wiggle-sort-ii "Wiggle Sort II") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/power-of-three "Power of Three") + ## 325. Maximum Size Subarray Sum Equals k (Medium) diff --git a/problems/maximum-xor-of-two-numbers-in-an-array/README.md b/problems/maximum-xor-of-two-numbers-in-an-array/README.md index 40e277341..a31826a77 100644 --- a/problems/maximum-xor-of-two-numbers-in-an-array/README.md +++ b/problems/maximum-xor-of-two-numbers-in-an-array/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/strong-password-checker "Strong Password Checker") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/valid-word-square "Valid Word Square") + ## 421. Maximum XOR of Two Numbers in an Array (Medium)

Given a non-empty array of numbers, a0, a1, a2, … , an-1, where 0 ≤ ai < 231.

diff --git a/problems/minesweeper/README.md b/problems/minesweeper/README.md index 6d8bf5460..dce6f500b 100644 --- a/problems/minesweeper/README.md +++ b/problems/minesweeper/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/random-pick-with-weight "Random Pick with Weight") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/minimum-absolute-difference-in-bst "Minimum Absolute Difference in BST") + ## 529. Minesweeper (Medium)

Let's play the minesweeper game (Wikipedia, online game)!

diff --git a/problems/mini-parser/README.md b/problems/mini-parser/README.md index b748c97e5..ffeebf984 100644 --- a/problems/mini-parser/README.md +++ b/problems/mini-parser/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/shuffle-an-array "Shuffle an Array") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/lexicographical-numbers "Lexicographical Numbers") + ## 385. Mini Parser (Medium)

Given a nested list of integers represented as a string, implement a parser to deserialize it.

diff --git a/problems/minimum-factorization/README.md b/problems/minimum-factorization/README.md index faeee975d..b6a463d77 100644 --- a/problems/minimum-factorization/README.md +++ b/problems/minimum-factorization/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/maximum-distance-in-arrays "Maximum Distance in Arrays") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/exchange-seats "Exchange Seats") + ## 625. Minimum Factorization (Medium)

Given a positive integer a, find the smallest positive integer b whose multiplication of each digit equals to a.

diff --git a/problems/minimum-moves-to-equal-array-elements/README.md b/problems/minimum-moves-to-equal-array-elements/README.md index c89fa75d5..78723228a 100644 --- a/problems/minimum-moves-to-equal-array-elements/README.md +++ b/problems/minimum-moves-to-equal-array-elements/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/minimum-number-of-arrows-to-burst-balloons "Minimum Number of Arrows to Burst Balloons") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/4sum-ii "4Sum II") + ## 453. Minimum Moves to Equal Array Elements (Easy)

Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n - 1 elements by 1.

diff --git a/problems/minimum-unique-word-abbreviation/README.md b/problems/minimum-unique-word-abbreviation/README.md index ddcd7ace6..9bd3bdb5d 100644 --- a/problems/minimum-unique-word-abbreviation/README.md +++ b/problems/minimum-unique-word-abbreviation/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/split-array-largest-sum "Split Array Largest Sum") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/fizz-buzz "Fizz Buzz") + ## 411. Minimum Unique Word Abbreviation (Hard) diff --git a/problems/most-frequent-subtree-sum/README.md b/problems/most-frequent-subtree-sum/README.md index 3a973e49f..2b0196fae 100644 --- a/problems/most-frequent-subtree-sum/README.md +++ b/problems/most-frequent-subtree-sum/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/perfect-number "Perfect Number") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/fibonacci-number "Fibonacci Number") + ## 508. Most Frequent Subtree Sum (Medium)

diff --git a/problems/move-zeroes/README.md b/problems/move-zeroes/README.md index 31c6f7d5b..a99ce6117 100644 --- a/problems/move-zeroes/README.md +++ b/problems/move-zeroes/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/expression-add-operators "Expression Add Operators") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/peeking-iterator "Peeking Iterator") + ## 283. Move Zeroes (Easy)

Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.

diff --git a/problems/moving-average-from-data-stream/README.md b/problems/moving-average-from-data-stream/README.md index 6ccb3156e..ed88e76fd 100644 --- a/problems/moving-average-from-data-stream/README.md +++ b/problems/moving-average-from-data-stream/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/reverse-vowels-of-a-string "Reverse Vowels of a String") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/top-k-frequent-elements "Top K Frequent Elements") + ## 346. Moving Average from Data Stream (Easy) diff --git a/problems/n-ary-tree-level-order-traversal/README.md b/problems/n-ary-tree-level-order-traversal/README.md index ced2d05d2..57bf25bc9 100644 --- a/problems/n-ary-tree-level-order-traversal/README.md +++ b/problems/n-ary-tree-level-order-traversal/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/serialize-and-deserialize-n-ary-tree "Serialize and Deserialize N-ary Tree") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/flatten-a-multilevel-doubly-linked-list "Flatten a Multilevel Doubly Linked List") + ## 429. N-ary Tree Level Order Traversal (Easy)

Given an n-ary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).

diff --git a/problems/n-ary-tree-postorder-traversal/README.md b/problems/n-ary-tree-postorder-traversal/README.md index 1ab632d72..2ff257bc1 100644 --- a/problems/n-ary-tree-postorder-traversal/README.md +++ b/problems/n-ary-tree-postorder-traversal/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/n-ary-tree-preorder-traversal "N-ary Tree Preorder Traversal") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/tag-validator "Tag Validator") + ## 590. N-ary Tree Postorder Traversal (Easy)

Given an n-ary tree, return the postorder traversal of its nodes' values.

diff --git a/problems/n-ary-tree-preorder-traversal/README.md b/problems/n-ary-tree-preorder-traversal/README.md index 5d8bc5c8f..c64ada611 100644 --- a/problems/n-ary-tree-preorder-traversal/README.md +++ b/problems/n-ary-tree-preorder-traversal/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/design-in-memory-file-system "Design In-Memory File System") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/n-ary-tree-postorder-traversal "N-ary Tree Postorder Traversal") + ## 589. N-ary Tree Preorder Traversal (Easy)

Given an n-ary tree, return the preorder traversal of its nodes' values.

diff --git a/problems/nested-list-weight-sum-ii/README.md b/problems/nested-list-weight-sum-ii/README.md index fe928d2b1..c20750236 100644 --- a/problems/nested-list-weight-sum-ii/README.md +++ b/problems/nested-list-weight-sum-ii/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/max-sum-of-rectangle-no-larger-than-k "Max Sum of Rectangle No Larger Than K") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/water-and-jug-problem "Water and Jug Problem") + ## 364. Nested List Weight Sum II (Medium) diff --git a/problems/next-greater-element-i/README.md b/problems/next-greater-element-i/README.md index f01c768d1..8f1eb9950 100644 --- a/problems/next-greater-element-i/README.md +++ b/problems/next-greater-element-i/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/teemo-attacking "Teemo Attacking") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/random-point-in-non-overlapping-rectangles "Random Point in Non-overlapping Rectangles") + ## 496. Next Greater Element I (Easy)

diff --git a/problems/next-greater-element-ii/README.md b/problems/next-greater-element-ii/README.md index 9fb6087d4..44dde42b7 100644 --- a/problems/next-greater-element-ii/README.md +++ b/problems/next-greater-element-ii/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/ipo "IPO") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/base-7 "Base 7") + ## 503. Next Greater Element II (Medium)

diff --git a/problems/next-greater-element-iii/README.md b/problems/next-greater-element-iii/README.md index 9c6525389..abc988908 100644 --- a/problems/next-greater-element-iii/README.md +++ b/problems/next-greater-element-iii/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/split-concatenated-strings "Split Concatenated Strings") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/reverse-words-in-a-string-iii "Reverse Words in a String III") + ## 556. Next Greater Element III (Medium)

Given a positive 32-bit integer n, you need to find the smallest 32-bit integer which has exactly the same digits existing in the integer n and is greater in value than n. If no such positive 32-bit integer exists, you need to return -1.

diff --git a/problems/non-overlapping-intervals/README.md b/problems/non-overlapping-intervals/README.md index 3174d2764..1ac9d7afe 100644 --- a/problems/non-overlapping-intervals/README.md +++ b/problems/non-overlapping-intervals/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/number-of-segments-in-a-string "Number of Segments in a String") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/find-right-interval "Find Right Interval") + ## 435. Non-overlapping Intervals (Medium)

diff --git a/problems/not-boring-movies/README.md b/problems/not-boring-movies/README.md index 61817353d..d3871624e 100644 --- a/problems/not-boring-movies/README.md +++ b/problems/not-boring-movies/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/biggest-single-number "Biggest Single Number") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/task-scheduler "Task Scheduler") + ## 620. Not Boring Movies (Easy) X city opened a new cinema, many people would like to go to this cinema. diff --git a/problems/number-complement/README.md b/problems/number-complement/README.md index 54d0b9956..116207b1b 100644 --- a/problems/number-complement/README.md +++ b/problems/number-complement/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/heaters "Heaters") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/total-hamming-distance "Total Hamming Distance") + ## 476. Number Complement (Easy)

Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.

diff --git a/problems/number-of-boomerangs/README.md b/problems/number-of-boomerangs/README.md index 68d977d44..efbb4c9f4 100644 --- a/problems/number-of-boomerangs/README.md +++ b/problems/number-of-boomerangs/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/arithmetic-slices-ii-subsequence "Arithmetic Slices II - Subsequence") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/find-all-numbers-disappeared-in-an-array "Find All Numbers Disappeared in an Array") + ## 447. Number of Boomerangs (Easy)

Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance between i and j equals the distance between i and k (the order of the tuple matters).

diff --git a/problems/number-of-connected-components-in-an-undirected-graph/README.md b/problems/number-of-connected-components-in-an-undirected-graph/README.md index 61f29deaa..659ee38bc 100644 --- a/problems/number-of-connected-components-in-an-undirected-graph/README.md +++ b/problems/number-of-connected-components-in-an-undirected-graph/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/coin-change "Coin Change") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/wiggle-sort-ii "Wiggle Sort II") + ## 323. Number of Connected Components in an Undirected Graph (Medium) diff --git a/problems/number-of-islands-ii/README.md b/problems/number-of-islands-ii/README.md index e66c1a4ad..958639895 100644 --- a/problems/number-of-islands-ii/README.md +++ b/problems/number-of-islands-ii/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/range-sum-query-2d-immutable "Range Sum Query 2D - Immutable") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/additive-number "Additive Number") + ## 305. Number of Islands II (Hard) diff --git a/problems/number-of-segments-in-a-string/README.md b/problems/number-of-segments-in-a-string/README.md index 63a7a9dc3..55836313e 100644 --- a/problems/number-of-segments-in-a-string/README.md +++ b/problems/number-of-segments-in-a-string/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/minimum-genetic-mutation "Minimum Genetic Mutation") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/non-overlapping-intervals "Non-overlapping Intervals") + ## 434. Number of Segments in a String (Easy)

Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space characters.

diff --git a/problems/odd-even-linked-list/README.md b/problems/odd-even-linked-list/README.md index 10fbb72ac..98f2050ec 100644 --- a/problems/odd-even-linked-list/README.md +++ b/problems/odd-even-linked-list/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/count-of-range-sum "Count of Range Sum") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/longest-increasing-path-in-a-matrix "Longest Increasing Path in a Matrix") + ## 328. Odd Even Linked List (Medium)

Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes.

diff --git a/problems/ones-and-zeroes/README.md b/problems/ones-and-zeroes/README.md index d9e6cd722..abcbcabd4 100644 --- a/problems/ones-and-zeroes/README.md +++ b/problems/ones-and-zeroes/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/matchsticks-to-square "Matchsticks to Square") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/heaters "Heaters") + ## 474. Ones and Zeroes (Medium)

In the computer world, use restricted resource you have to generate maximum benefit is what we always want to pursue.

diff --git a/problems/optimal-division/README.md b/problems/optimal-division/README.md index 086a827ed..a1d2c811f 100644 --- a/problems/optimal-division/README.md +++ b/problems/optimal-division/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/student-attendance-record-ii "Student Attendance Record II") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/brick-wall "Brick Wall") + ## 553. Optimal Division (Medium)

Given a list of positive integers, the adjacent integers will perform the float division. For example, [2,3,4] -> 2 / 3 / 4.

diff --git a/problems/output-contest-matches/README.md b/problems/output-contest-matches/README.md index 47f2f5d6a..f227ac7a3 100644 --- a/problems/output-contest-matches/README.md +++ b/problems/output-contest-matches/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/diameter-of-binary-tree "Diameter of Binary Tree") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/boundary-of-binary-tree "Boundary of Binary Tree") + ## 544. Output Contest Matches (Medium)

diff --git a/problems/pacific-atlantic-water-flow/README.md b/problems/pacific-atlantic-water-flow/README.md index e442347a4..7f28f1feb 100644 --- a/problems/pacific-atlantic-water-flow/README.md +++ b/problems/pacific-atlantic-water-flow/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/partition-equal-subset-sum "Partition Equal Subset Sum") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/sentence-screen-fitting "Sentence Screen Fitting") + ## 417. Pacific Atlantic Water Flow (Medium)

Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the "Pacific ocean" touches the left and top edges of the matrix and the "Atlantic ocean" touches the right and bottom edges.

diff --git a/problems/palindromic-substrings/README.md b/problems/palindromic-substrings/README.md index 24f3d5dc1..4e7b7fb68 100644 --- a/problems/palindromic-substrings/README.md +++ b/problems/palindromic-substrings/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/maximum-length-of-pair-chain "Maximum Length of Pair Chain") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/replace-words "Replace Words") + ## 647. Palindromic Substrings (Medium)

diff --git a/problems/partition-equal-subset-sum/README.md b/problems/partition-equal-subset-sum/README.md index db54410f5..9f3b6a8e3 100644 --- a/problems/partition-equal-subset-sum/README.md +++ b/problems/partition-equal-subset-sum/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/add-strings "Add Strings") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/pacific-atlantic-water-flow "Pacific Atlantic Water Flow") + ## 416. Partition Equal Subset Sum (Medium)

Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal. diff --git a/problems/path-sum-iii/README.md b/problems/path-sum-iii/README.md index 9627eac5b..5a046f949 100644 --- a/problems/path-sum-iii/README.md +++ b/problems/path-sum-iii/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/find-right-interval "Find Right Interval") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/find-all-anagrams-in-a-string "Find All Anagrams in a String") + ## 437. Path Sum III (Easy)

You are given a binary tree in which each node contains an integer value.

diff --git a/problems/perfect-number/README.md b/problems/perfect-number/README.md index 51caddda3..089af9435 100644 --- a/problems/perfect-number/README.md +++ b/problems/perfect-number/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/relative-ranks "Relative Ranks") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/most-frequent-subtree-sum "Most Frequent Subtree Sum") + ## 507. Perfect Number (Easy)

We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. diff --git a/problems/perfect-rectangle/README.md b/problems/perfect-rectangle/README.md index b4db1dbb8..9ca3dd8b2 100644 --- a/problems/perfect-rectangle/README.md +++ b/problems/perfect-rectangle/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/elimination-game "Elimination Game") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/is-subsequence "Is Subsequence") + ## 391. Perfect Rectangle (Hard)

Given N axis-aligned rectangles where N > 0, determine if they all together form an exact cover of a rectangular region.

diff --git a/problems/plus-one-linked-list/README.md b/problems/plus-one-linked-list/README.md index a68cdc56e..c12258531 100644 --- a/problems/plus-one-linked-list/README.md +++ b/problems/plus-one-linked-list/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/largest-divisible-subset "Largest Divisible Subset") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/range-addition "Range Addition") + ## 369. Plus One Linked List (Medium) diff --git a/problems/poor-pigs/README.md b/problems/poor-pigs/README.md index 83165d84a..0f76113c7 100644 --- a/problems/poor-pigs/README.md +++ b/problems/poor-pigs/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/circular-array-loop "Circular Array Loop") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/repeated-substring-pattern "Repeated Substring Pattern") + ## 458. Poor Pigs (Easy)

There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all look the same. If a pig drinks that poison it will die within 15 minutes. What is the minimum amount of pigs you need to figure out which bucket contains the poison within one hour.

diff --git a/problems/power-of-four/README.md b/problems/power-of-four/README.md index 89cb412a8..78887bb85 100644 --- a/problems/power-of-four/README.md +++ b/problems/power-of-four/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/flatten-nested-list-iterator "Flatten Nested List Iterator") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/integer-break "Integer Break") + ## 342. Power of Four (Easy)

Given an integer (signed 32 bits), write a function to check whether it is a power of 4.

diff --git a/problems/power-of-three/README.md b/problems/power-of-three/README.md index b85250321..abc90eff3 100644 --- a/problems/power-of-three/README.md +++ b/problems/power-of-three/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/maximum-size-subarray-sum-equals-k "Maximum Size Subarray Sum Equals k") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/count-of-range-sum "Count of Range Sum") + ## 326. Power of Three (Easy)

Given an integer, write a function to determine if it is a power of three.

diff --git a/problems/power-of-two/README.md b/problems/power-of-two/README.md index bdf629daa..6ab460c8a 100644 --- a/problems/power-of-two/README.md +++ b/problems/power-of-two/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/kth-smallest-element-in-a-bst "Kth Smallest Element in a BST") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/implement-queue-using-stacks "Implement Queue using Stacks") + ## 231. Power of Two (Easy)

Given an integer, write a function to determine if it is a power of two.

diff --git a/problems/predict-the-winner/README.md b/problems/predict-the-winner/README.md index dd8a0c531..c25a9fd93 100644 --- a/problems/predict-the-winner/README.md +++ b/problems/predict-the-winner/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/max-consecutive-ones "Max Consecutive Ones") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/max-consecutive-ones-ii "Max Consecutive Ones II") + ## 486. Predict the Winner (Medium)

Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and then player 1 and so on. Each time a player picks a number, that number will not be available for the next player. This continues until all the scores have been chosen. The player with the maximum score wins.

diff --git a/problems/product-of-array-except-self/README.md b/problems/product-of-array-except-self/README.md index 273beba30..1a6daf157 100644 --- a/problems/product-of-array-except-self/README.md +++ b/problems/product-of-array-except-self/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/delete-node-in-a-linked-list "Delete Node in a Linked List") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/sliding-window-maximum "Sliding Window Maximum") + ## 238. Product of Array Except Self (Medium)

Given an array nums of n integers where n > 1,  return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].

diff --git a/problems/quad-tree-intersection/README.md b/problems/quad-tree-intersection/README.md index b5b97de21..79ea3ecc3 100644 --- a/problems/quad-tree-intersection/README.md +++ b/problems/quad-tree-intersection/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/reverse-words-in-a-string-iii "Reverse Words in a String III") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/maximum-depth-of-n-ary-tree "Maximum Depth of N-ary Tree") + ## 558. Quad Tree Intersection (Easy)

A quadtree is a tree data in which each internal node has exactly four children: topLeft, topRight, bottomLeft and bottomRight. Quad trees are often used to partition a two-dimensional space by recursively subdividing it into four quadrants or regions.

diff --git a/problems/queue-reconstruction-by-height/README.md b/problems/queue-reconstruction-by-height/README.md index 969c8d93d..ec83cc47c 100644 --- a/problems/queue-reconstruction-by-height/README.md +++ b/problems/queue-reconstruction-by-height/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/convert-a-number-to-hexadecimal "Convert a Number to Hexadecimal") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/trapping-rain-water-ii "Trapping Rain Water II") + ## 406. Queue Reconstruction by Height (Medium)

Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the person and k is the number of people in front of this person who have a height greater than or equal to h. Write an algorithm to reconstruct the queue. diff --git a/problems/random-flip-matrix/README.md b/problems/random-flip-matrix/README.md index 4bacce8f9..dbc5b5f9c 100644 --- a/problems/random-flip-matrix/README.md +++ b/problems/random-flip-matrix/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/coin-change-2 "Coin Change 2") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/detect-capital "Detect Capital") + ## 519. Random Flip Matrix (Medium)

You are given the number of rows n_rows and number of columns n_cols of a 2D binary matrix where all values are initially 0. Write a function flip which chooses a 0 value uniformly at random, changes it to 1, and then returns the position [row.id, col.id] of that value. Also, write a function reset which sets all values back to 0. Try to minimize the number of calls to system's Math.random() and optimize the time and space complexity.

diff --git a/problems/random-pick-index/README.md b/problems/random-pick-index/README.md index 44c781fdc..443f7af5f 100644 --- a/problems/random-pick-index/README.md +++ b/problems/random-pick-index/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/integer-replacement "Integer Replacement") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/evaluate-division "Evaluate Division") + ## 398. Random Pick Index (Medium)

Given an array of integers with possible duplicates, randomly output the index of a given target number. You can assume that the given target number must exist in the array.

diff --git a/problems/random-pick-with-weight/README.md b/problems/random-pick-with-weight/README.md index 4abd98329..83593518e 100644 --- a/problems/random-pick-with-weight/README.md +++ b/problems/random-pick-with-weight/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/word-abbreviation "Word Abbreviation") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/minesweeper "Minesweeper") + ## 528. Random Pick with Weight (Medium)

Given an array w of positive integers, where w[i] describes the weight of index i, write a function pickIndex which randomly picks an index in proportion to its weight.

diff --git a/problems/random-point-in-non-overlapping-rectangles/README.md b/problems/random-point-in-non-overlapping-rectangles/README.md index 55b1502b4..0b88d9d68 100644 --- a/problems/random-point-in-non-overlapping-rectangles/README.md +++ b/problems/random-point-in-non-overlapping-rectangles/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/next-greater-element-i "Next Greater Element I") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/diagonal-traverse "Diagonal Traverse") + ## 497. Random Point in Non-overlapping Rectangles (Medium)

Given a list of non-overlapping axis-aligned rectangles rects, write a function pick which randomly and uniformily picks an integer point in the space covered by the rectangles.

diff --git a/problems/range-addition-ii/README.md b/problems/range-addition-ii/README.md index b69c4f798..7433e1a63 100644 --- a/problems/range-addition-ii/README.md +++ b/problems/range-addition-ii/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/friend-requests-i-overall-acceptance-rate "Friend Requests I: Overall Acceptance Rate") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/minimum-index-sum-of-two-lists "Minimum Index Sum of Two Lists") + ## 598. Range Addition II (Easy)

Given an m * n matrix M initialized with all 0's and several update operations.

diff --git a/problems/range-addition/README.md b/problems/range-addition/README.md index a7e9d18d4..c3c956ce9 100644 --- a/problems/range-addition/README.md +++ b/problems/range-addition/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/plus-one-linked-list "Plus One Linked List") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/sum-of-two-integers "Sum of Two Integers") + ## 370. Range Addition (Medium) diff --git a/problems/range-sum-query-2d-immutable/README.md b/problems/range-sum-query-2d-immutable/README.md index e0d72dfb0..389895f2e 100644 --- a/problems/range-sum-query-2d-immutable/README.md +++ b/problems/range-sum-query-2d-immutable/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/range-sum-query-immutable "Range Sum Query - Immutable") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/number-of-islands-ii "Number of Islands II") + ## 304. Range Sum Query 2D - Immutable (Medium)

Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2, col2).

diff --git a/problems/range-sum-query-2d-mutable/README.md b/problems/range-sum-query-2d-mutable/README.md index 1622ea3cf..26d6a6068 100644 --- a/problems/range-sum-query-2d-mutable/README.md +++ b/problems/range-sum-query-2d-mutable/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/range-sum-query-mutable "Range Sum Query - Mutable") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/best-time-to-buy-and-sell-stock-with-cooldown "Best Time to Buy and Sell Stock with Cooldown") + ## 308. Range Sum Query 2D - Mutable (Hard) diff --git a/problems/range-sum-query-immutable/README.md b/problems/range-sum-query-immutable/README.md index 773729576..241bed11f 100644 --- a/problems/range-sum-query-immutable/README.md +++ b/problems/range-sum-query-immutable/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/smallest-rectangle-enclosing-black-pixels "Smallest Rectangle Enclosing Black Pixels") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/range-sum-query-2d-immutable "Range Sum Query 2D - Immutable") + ## 303. Range Sum Query - Immutable (Easy)

Given an integer array nums, find the sum of the elements between indices i and j (ij), inclusive.

diff --git a/problems/range-sum-query-mutable/README.md b/problems/range-sum-query-mutable/README.md index 3e46ae5dc..b19b55f22 100644 --- a/problems/range-sum-query-mutable/README.md +++ b/problems/range-sum-query-mutable/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/additive-number "Additive Number") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/range-sum-query-2d-mutable "Range Sum Query 2D - Mutable") + ## 307. Range Sum Query - Mutable (Medium)

Given an integer array nums, find the sum of the elements between indices i and j (ij), inclusive.

diff --git a/problems/ransom-note/README.md b/problems/ransom-note/README.md index db87a4af9..b1dcfdc19 100644 --- a/problems/ransom-note/README.md +++ b/problems/ransom-note/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/linked-list-random-node "Linked List Random Node") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/shuffle-an-array "Shuffle an Array") + ## 383. Ransom Note (Easy)

diff --git a/problems/rearrange-string-k-distance-apart/README.md b/problems/rearrange-string-k-distance-apart/README.md index 2ef714098..e556813ab 100644 --- a/problems/rearrange-string-k-distance-apart/README.md +++ b/problems/rearrange-string-k-distance-apart/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/count-numbers-with-unique-digits "Count Numbers with Unique Digits") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/logger-rate-limiter "Logger Rate Limiter") + ## 358. Rearrange String k Distance Apart (Hard) diff --git a/problems/reconstruct-itinerary/README.md b/problems/reconstruct-itinerary/README.md index 536e8cbfa..8cd42f02b 100644 --- a/problems/reconstruct-itinerary/README.md +++ b/problems/reconstruct-itinerary/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/verify-preorder-serialization-of-a-binary-tree "Verify Preorder Serialization of a Binary Tree") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/largest-bst-subtree "Largest BST Subtree") + ## 332. Reconstruct Itinerary (Medium)

Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of the tickets belong to a man who departs from JFK. Thus, the itinerary must begin with JFK.

diff --git a/problems/reconstruct-original-digits-from-english/README.md b/problems/reconstruct-original-digits-from-english/README.md index b2cd9a593..7ca078ca5 100644 --- a/problems/reconstruct-original-digits-from-english/README.md +++ b/problems/reconstruct-original-digits-from-english/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/valid-word-square "Valid Word Square") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/longest-repeating-character-replacement "Longest Repeating Character Replacement") + ## 423. Reconstruct Original Digits from English (Medium)

Given a non-empty string containing an out-of-order English representation of digits 0-9, output the digits in ascending order.

diff --git a/problems/relative-ranks/README.md b/problems/relative-ranks/README.md index 6adea1c4b..763893262 100644 --- a/problems/relative-ranks/README.md +++ b/problems/relative-ranks/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/the-maze-ii "The Maze II") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/perfect-number "Perfect Number") + ## 506. Relative Ranks (Easy)

diff --git a/problems/remove-boxes/README.md b/problems/remove-boxes/README.md index c98924878..5d5e84790 100644 --- a/problems/remove-boxes/README.md +++ b/problems/remove-boxes/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/boundary-of-binary-tree "Boundary of Binary Tree") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/friend-circles "Friend Circles") + ## 546. Remove Boxes (Hard)

Given several boxes with different colors represented by different positive numbers.
diff --git a/problems/reshape-the-matrix/README.md b/problems/reshape-the-matrix/README.md index c7f38c7a8..1cb6cbd30 100644 --- a/problems/reshape-the-matrix/README.md +++ b/problems/reshape-the-matrix/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/array-nesting "Array Nesting") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/permutation-in-string "Permutation in String") + ## 566. Reshape the Matrix (Easy)

In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data. diff --git a/problems/reverse-pairs/README.md b/problems/reverse-pairs/README.md index fbe733a4c..f71dac118 100644 --- a/problems/reverse-pairs/README.md +++ b/problems/reverse-pairs/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/construct-the-rectangle "Construct the Rectangle") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/target-sum "Target Sum") + ## 493. Reverse Pairs (Hard)

Given an array nums, we call (i, j) an important reverse pair if i < j and nums[i] > 2*nums[j].

diff --git a/problems/reverse-string-ii/README.md b/problems/reverse-string-ii/README.md index 6f72abf24..8f10a5911 100644 --- a/problems/reverse-string-ii/README.md +++ b/problems/reverse-string-ii/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/single-element-in-a-sorted-array "Single Element in a Sorted Array") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/01-matrix "01 Matrix") + ## 541. Reverse String II (Easy)

diff --git a/problems/reverse-string/README.md b/problems/reverse-string/README.md index adc33107e..2bd932c9f 100644 --- a/problems/reverse-string/README.md +++ b/problems/reverse-string/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/integer-break "Integer Break") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/reverse-vowels-of-a-string "Reverse Vowels of a String") + ## 344. Reverse String (Easy)

Write a function that reverses a string. The input string is given as an array of characters char[].

diff --git a/problems/reverse-vowels-of-a-string/README.md b/problems/reverse-vowels-of-a-string/README.md index 72766b87f..87030ce5b 100644 --- a/problems/reverse-vowels-of-a-string/README.md +++ b/problems/reverse-vowels-of-a-string/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/reverse-string "Reverse String") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/moving-average-from-data-stream "Moving Average from Data Stream") + ## 345. Reverse Vowels of a String (Easy)

Write a function that takes a string as input and reverse only the vowels of a string.

diff --git a/problems/reverse-words-in-a-string-iii/README.md b/problems/reverse-words-in-a-string-iii/README.md index 1fa61ce82..a26afd2ac 100644 --- a/problems/reverse-words-in-a-string-iii/README.md +++ b/problems/reverse-words-in-a-string-iii/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/next-greater-element-iii "Next Greater Element III") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/quad-tree-intersection "Quad Tree Intersection") + ## 557. Reverse Words in a String III (Easy)

Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.

diff --git a/problems/rotate-function/README.md b/problems/rotate-function/README.md index da938aec2..247ce02b5 100644 --- a/problems/rotate-function/README.md +++ b/problems/rotate-function/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/longest-substring-with-at-least-k-repeating-characters "Longest Substring with At Least K Repeating Characters") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/integer-replacement "Integer Replacement") + ## 396. Rotate Function (Medium)

diff --git a/problems/self-crossing/README.md b/problems/self-crossing/README.md index 17f5f8b4d..76aa8319a 100644 --- a/problems/self-crossing/README.md +++ b/problems/self-crossing/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/increasing-triplet-subsequence "Increasing Triplet Subsequence") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/palindrome-pairs "Palindrome Pairs") + ## 335. Self Crossing (Hard)

You are given an array x of n positive numbers. You start at point (0,0) and moves x[0] metres to the north, then x[1] metres to the west, x[2] metres to the south, x[3] metres to the east and so on. In other words, after each move your direction changes counter-clockwise.

diff --git a/problems/shortest-distance-in-a-plane/README.md b/problems/shortest-distance-in-a-plane/README.md index 9e6df826f..8265c218b 100644 --- a/problems/shortest-distance-in-a-plane/README.md +++ b/problems/shortest-distance-in-a-plane/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/valid-triangle-number "Valid Triangle Number") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/shortest-distance-in-a-line "Shortest Distance in a Line") + ## 612. Shortest Distance in a Plane (Medium) Table point_2d holds the coordinates (x,y) of some unique points (more than two) in a plane.

diff --git a/problems/shortest-unsorted-continuous-subarray/README.md b/problems/shortest-unsorted-continuous-subarray/README.md index d82580401..53852318a 100644 --- a/problems/shortest-unsorted-continuous-subarray/README.md +++ b/problems/shortest-unsorted-continuous-subarray/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/count-student-number-in-departments "Count Student Number in Departments") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/kill-process "Kill Process") + ## 581. Shortest Unsorted Continuous Subarray (Easy)

Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be sorted in ascending order, too.

diff --git a/problems/shortest-word-distance-iii/README.md b/problems/shortest-word-distance-iii/README.md index c2fd65f9c..da63328d7 100644 --- a/problems/shortest-word-distance-iii/README.md +++ b/problems/shortest-word-distance-iii/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/shortest-word-distance-ii "Shortest Word Distance II") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/strobogrammatic-number "Strobogrammatic Number") + ## 245. Shortest Word Distance III (Medium) diff --git a/problems/single-element-in-a-sorted-array/README.md b/problems/single-element-in-a-sorted-array/README.md index 9863852c7..437485645 100644 --- a/problems/single-element-in-a-sorted-array/README.md +++ b/problems/single-element-in-a-sorted-array/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/minimum-time-difference "Minimum Time Difference") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/reverse-string-ii "Reverse String II") + ## 540. Single Element in a Sorted Array (Medium)

diff --git a/problems/single-number-iii/README.md b/problems/single-number-iii/README.md index 17cd67334..f39c9fc7a 100644 --- a/problems/single-number-iii/README.md +++ b/problems/single-number-iii/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/3sum-smaller "3Sum Smaller") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/graph-valid-tree "Graph Valid Tree") + ## 260. Single Number III (Medium)

Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once.

diff --git a/problems/sort-colors/README.md b/problems/sort-colors/README.md index 64b1de536..295f0c19a 100644 --- a/problems/sort-colors/README.md +++ b/problems/sort-colors/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/search-a-2d-matrix "Search a 2D Matrix") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/minimum-window-substring "Minimum Window Substring") + ## 75. Sort Colors (Medium)

Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white and blue.

diff --git a/problems/sum-of-square-numbers/README.md b/problems/sum-of-square-numbers/README.md index ad686ba66..fe9f2a0ac 100644 --- a/problems/sum-of-square-numbers/README.md +++ b/problems/sum-of-square-numbers/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/smallest-range "Smallest Range") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/find-the-derangement-of-an-array "Find the Derangement of An Array") + ## 633. Sum of Square Numbers (Easy)

diff --git a/problems/swap-salary/README.md b/problems/swap-salary/README.md index 447edd3d4..f94ea2e00 100644 --- a/problems/swap-salary/README.md +++ b/problems/swap-salary/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/exchange-seats "Exchange Seats") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/maximum-product-of-three-numbers "Maximum Product of Three Numbers") + ## 627. Swap Salary (Easy) Given a table salary, such as the one below, that has m=male and f=female values. Swap all f and m values (i.e., change all f values to m and vice versa) with a single update query and no intermediate temp table.

diff --git a/problems/tag-validator/README.md b/problems/tag-validator/README.md index 2de344492..03d26fa2b 100644 --- a/problems/tag-validator/README.md +++ b/problems/tag-validator/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/n-ary-tree-postorder-traversal "N-ary Tree Postorder Traversal") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/fraction-addition-and-subtraction "Fraction Addition and Subtraction") + ## 591. Tag Validator (Hard)

Given a string representing a code snippet, you need to implement a tag validator to parse the code and return whether it is valid. A code snippet is valid if all the following rules hold:

diff --git a/problems/target-sum/README.md b/problems/target-sum/README.md index bd3b39144..238a8e0a2 100644 --- a/problems/target-sum/README.md +++ b/problems/target-sum/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/reverse-pairs "Reverse Pairs") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/teemo-attacking "Teemo Attacking") + ## 494. Target Sum (Medium)

diff --git a/problems/task-scheduler/README.md b/problems/task-scheduler/README.md index 8ea88c7eb..db6577af1 100644 --- a/problems/task-scheduler/README.md +++ b/problems/task-scheduler/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/not-boring-movies "Not Boring Movies") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/design-circular-queue "Design Circular Queue") + ## 621. Task Scheduler (Medium)

Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks. Tasks could be done without original order. Each task could be done in one interval. For each interval, CPU could finish one task or just be idle.

diff --git a/problems/the-maze-ii/README.md b/problems/the-maze-ii/README.md index 1919e173e..eeb395295 100644 --- a/problems/the-maze-ii/README.md +++ b/problems/the-maze-ii/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/base-7 "Base 7") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/relative-ranks "Relative Ranks") + ## 505. The Maze II (Medium)

There is a ball in a maze with empty spaces and walls. The ball can go through empty spaces by rolling up, down, left or right, but it won't stop rolling until hitting a wall. When the ball stops, it could choose the next direction.

diff --git a/problems/total-hamming-distance/README.md b/problems/total-hamming-distance/README.md index a97ba6dcf..d4c9474b9 100644 --- a/problems/total-hamming-distance/README.md +++ b/problems/total-hamming-distance/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/number-complement "Number Complement") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/generate-random-point-in-a-circle "Generate Random Point in a Circle") + ## 477. Total Hamming Distance (Medium)

The Hamming distance between two integers is the number of positions at which the corresponding bits are different.

diff --git a/problems/wiggle-subsequence/README.md b/problems/wiggle-subsequence/README.md index 8e97ab790..9ca98f4f5 100644 --- a/problems/wiggle-subsequence/README.md +++ b/problems/wiggle-subsequence/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/guess-number-higher-or-lower-ii "Guess Number Higher or Lower II") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/combination-sum-iv "Combination Sum IV") + ## 376. Wiggle Subsequence (Medium)

A sequence of numbers is called a wiggle sequence if the differences between successive numbers strictly alternate between positive and negative. The first difference (if one exists) may be either positive or negative. A sequence with fewer than two elements is trivially a wiggle sequence.

diff --git a/problems/winning-candidate/README.md b/problems/winning-candidate/README.md index 485421519..5d1ed68f6 100644 --- a/problems/winning-candidate/README.md +++ b/problems/winning-candidate/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/squirrel-simulation "Squirrel Simulation") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/distribute-candies "Distribute Candies") + ## 574. Winning Candidate (Medium)

Table: Candidate

diff --git a/problems/word-break-ii/README.md b/problems/word-break-ii/README.md index e12ad2178..283cf9afe 100644 --- a/problems/word-break-ii/README.md +++ b/problems/word-break-ii/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/word-break "Word Break") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/linked-list-cycle "Linked List Cycle") + ## 140. Word Break II (Hard)

Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible sentences.

diff --git a/problems/word-ladder/README.md b/problems/word-ladder/README.md index 6962a007c..3f6055858 100644 --- a/problems/word-ladder/README.md +++ b/problems/word-ladder/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/word-ladder-ii "Word Ladder II") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/longest-consecutive-sequence "Longest Consecutive Sequence") + ## 127. Word Ladder (Medium)

Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, such that:

diff --git a/problems/word-pattern/README.md b/problems/word-pattern/README.md index 133ac82f0..5c52b01be 100644 --- a/problems/word-pattern/README.md +++ b/problems/word-pattern/README.md @@ -5,6 +5,10 @@ +[< Previous](https://github.com/openset/leetcode/tree/master/problems/game-of-life "Game of Life") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/word-pattern-ii "Word Pattern II") + ## 290. Word Pattern (Easy)

Given a pattern and a string str, find if str follows the same pattern.