Skip to content

Commit 1a60cd0

Browse files
committed
Add: Navigation
1 parent 5bac132 commit 1a60cd0

File tree

100 files changed

+400
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+400
-0
lines changed

problems/graph-valid-tree/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/single-number-iii "Single Number III")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/trips-and-users "Trips and Users")
11+
812
## 261. Graph Valid Tree (Medium)
913

1014

problems/group-anagrams/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/rotate-image "Rotate Image")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/powx-n "Pow(x, n)")
11+
812
## 49. Group Anagrams (Medium)
913

1014
<p>Given an array of strings, group anagrams together.</p>

problems/group-shifted-strings/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/strobogrammatic-number-iii "Strobogrammatic Number III")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/count-univalue-subtrees "Count Univalue Subtrees")
11+
812
## 249. Group Shifted Strings (Medium)
913

1014

problems/guess-number-higher-or-lower-ii/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/guess-number-higher-or-lower "Guess Number Higher or Lower")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/wiggle-subsequence "Wiggle Subsequence")
11+
812
## 375. Guess Number Higher or Lower II (Medium)
913

1014
<p>We are playing the Guess Game. The game is as follows:</p>

problems/guess-number-higher-or-lower/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/find-k-pairs-with-smallest-sums "Find K Pairs with Smallest Sums")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/guess-number-higher-or-lower-ii "Guess Number Higher or Lower II")
11+
812
## 374. Guess Number Higher or Lower (Easy)
913

1014
<p>We are playing the Guess Game. The game is as follows:</p>

problems/hamming-distance/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/lfu-cache "LFU Cache")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/minimum-moves-to-equal-array-elements-ii "Minimum Moves to Equal Array Elements II")
11+
812
## 461. Hamming Distance (Easy)
913

1014
<p>The <a href="https://en.wikipedia.org/wiki/Hamming_distance" target="_blank">Hamming distance</a> between two integers is the number of positions at which the corresponding bits are different.</p>

problems/happy-number/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/bitwise-and-of-numbers-range "Bitwise AND of Numbers Range")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/remove-linked-list-elements "Remove Linked List Elements")
11+
812
## 202. Happy Number (Easy)
913

1014
<p>Write an algorithm to determine if a number is &quot;happy&quot;.</p>

problems/heaters/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/ones-and-zeroes "Ones and Zeroes")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/number-complement "Number Complement")
11+
812
## 475. Heaters (Easy)
913

1014
<p>Winter is coming! Your first job during the contest is to design a standard heater with fixed warm radius to warm all the houses.</p>

problems/house-robber-iii/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/palindrome-pairs "Palindrome Pairs")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/counting-bits "Counting Bits")
11+
812
## 337. House Robber III (Medium)
913

1014
<p>The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the &quot;root.&quot; Besides the root, each house has one and only one parent house. After a tour, the smart thief realized that &quot;all houses in this place forms a binary tree&quot;. It will automatically contact the police if two directly-linked houses were broken into on the same night.</p>

problems/house-robber/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/rising-temperature "Rising Temperature")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/binary-tree-right-side-view "Binary Tree Right Side View")
11+
812
## 198. House Robber (Easy)
913

1014
<p>You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security system connected and <b>it will automatically contact the police if two adjacent houses were broken into on the same night</b>.</p>

problems/human-traffic-of-stadium/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/non-negative-integers-without-consecutive-ones "Non-negative Integers without Consecutive Ones")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/friend-requests-ii-who-has-the-most-friends "Friend Requests II: Who Has the Most Friends")
11+
812
## 601. Human Traffic of Stadium (Hard)
913

1014
<p>X city built a new stadium, each day many people visit it and the stats are saved as these columns: <b>id</b>, <b>date</b>, <b>people</b>

problems/image-smoother/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/remove-9 "Remove 9")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/maximum-width-of-binary-tree "Maximum Width of Binary Tree")
11+
812
## 661. Image Smoother (Easy)
913

1014
<p>Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray scale of each cell becomes the average gray scale (rounding down) of all the 8 surrounding cells and itself. If a cell has less than 8 surrounding cells, then use as many as you can.</p>

problems/implement-magic-dictionary/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/cut-off-trees-for-golf-event "Cut Off Trees for Golf Event")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/map-sum-pairs "Map Sum Pairs")
11+
812
## 676. Implement Magic Dictionary (Medium)
913

1014
<p>

problems/implement-queue-using-stacks/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/power-of-two "Power of Two")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/number-of-digit-one "Number of Digit One")
11+
812
## 232. Implement Queue using Stacks (Easy)
913

1014
<p>Implement the following operations of a queue using stacks.</p>

problems/implement-rand10-using-rand7/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/convex-polygon "Convex Polygon")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/encode-string-with-shortest-length "Encode String with Shortest Length")
11+
812
## 470. Implement Rand10() Using Rand7() (Medium)
913

1014
<p>Given a function <code>rand7</code> which generates a uniform random integer in the range 1 to 7, write a function <code>rand10</code>&nbsp;which generates a uniform random integer in the range 1 to 10.</p>

problems/implement-stack-using-queues/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/basic-calculator "Basic Calculator")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/invert-binary-tree "Invert Binary Tree")
11+
812
## 225. Implement Stack using Queues (Easy)
913

1014
<p>Implement the following operations of a stack using queues.</p>

problems/implement-strstr/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/remove-element "Remove Element")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/divide-two-integers "Divide Two Integers")
11+
812
## 28. Implement strStr() (Easy)
913

1014
<p>Implement <a href="http://www.cplusplus.com/reference/cstring/strstr/" target="_blank">strStr()</a>.</p>

problems/implement-trie-prefix-tree/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/course-schedule "Course Schedule")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/minimum-size-subarray-sum "Minimum Size Subarray Sum")
11+
812
## 208. Implement Trie (Prefix Tree) (Medium)
913

1014
<p>Implement a trie with <code>insert</code>, <code>search</code>, and <code>startsWith</code> methods.</p>

problems/increasing-triplet-subsequence/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/largest-bst-subtree "Largest BST Subtree")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/self-crossing "Self Crossing")
11+
812
## 334. Increasing Triplet Subsequence (Medium)
913

1014
<p>Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array.</p>

problems/inorder-successor-in-bst-ii/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/fibonacci-number "Fibonacci Number")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/find-bottom-left-tree-value "Find Bottom Left Tree Value")
11+
812
## 510. Inorder Successor in BST II (Medium)
913

1014

problems/inorder-successor-in-bst/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/peeking-iterator "Peeking Iterator")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/walls-and-gates "Walls and Gates")
11+
812
## 285. Inorder Successor in BST (Medium)
913

1014

problems/insert-delete-getrandom-o1-duplicates-allowed/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/insert-delete-getrandom-o1 "Insert Delete GetRandom O(1)")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/linked-list-random-node "Linked List Random Node")
11+
812
## 381. Insert Delete GetRandom O(1) - Duplicates allowed (Hard)
913

1014
<p>Design a data structure that supports all following operations in <i>average</i> <b>O(1)</b> time.</p>

problems/insert-delete-getrandom-o1/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/design-phone-directory "Design Phone Directory")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/insert-delete-getrandom-o1-duplicates-allowed "Insert Delete GetRandom O(1) - Duplicates allowed")
11+
812
## 380. Insert Delete GetRandom O(1) (Medium)
913

1014
<p>Design a data structure that supports all following operations in <i>average</i> <b>O(1)</b> time.</p>

problems/insert-interval/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/merge-intervals "Merge Intervals")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/length-of-last-word "Length of Last Word")
11+
812
## 57. Insert Interval (Hard)
913

1014
<p>Given a set of <em>non-overlapping</em> intervals, insert a new interval into the intervals (merge if necessary).</p>

problems/insert-into-a-binary-search-tree/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/search-in-a-binary-search-tree "Search in a Binary Search Tree")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/search-in-a-sorted-array-of-unknown-size "Search in a Sorted Array of Unknown Size")
11+
812
## 701. Insert into a Binary Search Tree (Medium)
913

1014
<p>Given the root node of a binary search tree (BST) and a value to be inserted into the tree,&nbsp;insert the value into the BST. Return the root node of the BST after the insertion. It is guaranteed that the new value does not exist in the original BST.</p>

problems/insert-into-a-cyclic-sorted-list/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/design-linked-list "Design Linked List")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/to-lower-case "To Lower Case")
11+
812
## 708. Insert into a Cyclic Sorted List (Medium)
913

1014

problems/insertion-sort-list/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/lru-cache "LRU Cache")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/sort-list "Sort List")
11+
812
## 147. Insertion Sort List (Medium)
913

1014
<p>Sort a linked list using insertion sort.</p>

problems/integer-replacement/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/rotate-function "Rotate Function")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/random-pick-index "Random Pick Index")
11+
812
## 397. Integer Replacement (Medium)
913

1014
<p>

problems/integer-to-roman/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/container-with-most-water "Container With Most Water")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/roman-to-integer "Roman to Integer")
11+
812
## 12. Integer to Roman (Medium)
913

1014
<p>Roman numerals are represented by seven different symbols:&nbsp;<code>I</code>, <code>V</code>, <code>X</code>, <code>L</code>, <code>C</code>, <code>D</code> and <code>M</code>.</p>

problems/intersection-of-two-arrays-ii/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/intersection-of-two-arrays "Intersection of Two Arrays")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/android-unlock-patterns "Android Unlock Patterns")
11+
812
## 350. Intersection of Two Arrays II (Easy)
913

1014
<p>Given two arrays, write a function to compute their intersection.</p>

problems/intersection-of-two-arrays/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/design-tic-tac-toe "Design Tic-Tac-Toe")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/intersection-of-two-arrays-ii "Intersection of Two Arrays II")
11+
812
## 349. Intersection of Two Arrays (Easy)
913

1014
<p>Given two arrays, write a function to compute their intersection.</p>

problems/intersection-of-two-linked-lists/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<!--|@home https://github.com/openset/leetcode |-->
66
<!--+----------------------------------------------------------------------+-->
77

8+
[< Previous](https://github.com/openset/leetcode/tree/master/problems/longest-substring-with-at-most-two-distinct-characters "Longest Substring with At Most Two Distinct Characters")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/one-edit-distance "One Edit Distance")
11+
812
## 160. Intersection of Two Linked Lists (Easy)
913

1014
<p>Write a program to find the node at which the intersection of two singly linked lists begins.</p>

0 commit comments

Comments
 (0)