Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions problems/graph-valid-tree/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/single-number-iii "Single Number III")

[Next >](https://github.com/openset/leetcode/tree/master/problems/trips-and-users "Trips and Users")

## 261. Graph Valid Tree (Medium)


Expand Down
4 changes: 4 additions & 0 deletions problems/group-anagrams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/rotate-image "Rotate Image")

[Next >](https://github.com/openset/leetcode/tree/master/problems/powx-n "Pow(x, n)")

## 49. Group Anagrams (Medium)

<p>Given an array of strings, group anagrams together.</p>
Expand Down
4 changes: 4 additions & 0 deletions problems/group-shifted-strings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/strobogrammatic-number-iii "Strobogrammatic Number III")

[Next >](https://github.com/openset/leetcode/tree/master/problems/count-univalue-subtrees "Count Univalue Subtrees")

## 249. Group Shifted Strings (Medium)


Expand Down
4 changes: 4 additions & 0 deletions problems/guess-number-higher-or-lower-ii/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/guess-number-higher-or-lower "Guess Number Higher or Lower")

[Next >](https://github.com/openset/leetcode/tree/master/problems/wiggle-subsequence "Wiggle Subsequence")

## 375. Guess Number Higher or Lower II (Medium)

<p>We are playing the Guess Game. The game is as follows:</p>
Expand Down
4 changes: 4 additions & 0 deletions problems/guess-number-higher-or-lower/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/find-k-pairs-with-smallest-sums "Find K Pairs with Smallest Sums")

[Next >](https://github.com/openset/leetcode/tree/master/problems/guess-number-higher-or-lower-ii "Guess Number Higher or Lower II")

## 374. Guess Number Higher or Lower (Easy)

<p>We are playing the Guess Game. The game is as follows:</p>
Expand Down
4 changes: 4 additions & 0 deletions problems/hamming-distance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/lfu-cache "LFU Cache")

[Next >](https://github.com/openset/leetcode/tree/master/problems/minimum-moves-to-equal-array-elements-ii "Minimum Moves to Equal Array Elements II")

## 461. Hamming Distance (Easy)

<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>
Expand Down
4 changes: 4 additions & 0 deletions problems/happy-number/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/bitwise-and-of-numbers-range "Bitwise AND of Numbers Range")

[Next >](https://github.com/openset/leetcode/tree/master/problems/remove-linked-list-elements "Remove Linked List Elements")

## 202. Happy Number (Easy)

<p>Write an algorithm to determine if a number is &quot;happy&quot;.</p>
Expand Down
4 changes: 4 additions & 0 deletions problems/heaters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/ones-and-zeroes "Ones and Zeroes")

[Next >](https://github.com/openset/leetcode/tree/master/problems/number-complement "Number Complement")

## 475. Heaters (Easy)

<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>
Expand Down
4 changes: 4 additions & 0 deletions problems/house-robber-iii/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/palindrome-pairs "Palindrome Pairs")

[Next >](https://github.com/openset/leetcode/tree/master/problems/counting-bits "Counting Bits")

## 337. House Robber III (Medium)

<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>
Expand Down
4 changes: 4 additions & 0 deletions problems/house-robber/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/rising-temperature "Rising Temperature")

[Next >](https://github.com/openset/leetcode/tree/master/problems/binary-tree-right-side-view "Binary Tree Right Side View")

## 198. House Robber (Easy)

<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>
Expand Down
4 changes: 4 additions & 0 deletions problems/human-traffic-of-stadium/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/non-negative-integers-without-consecutive-ones "Non-negative Integers without Consecutive Ones")

[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")

## 601. Human Traffic of Stadium (Hard)

<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>
Expand Down
4 changes: 4 additions & 0 deletions problems/image-smoother/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/remove-9 "Remove 9")

[Next >](https://github.com/openset/leetcode/tree/master/problems/maximum-width-of-binary-tree "Maximum Width of Binary Tree")

## 661. Image Smoother (Easy)

<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>
Expand Down
4 changes: 4 additions & 0 deletions problems/implement-magic-dictionary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/cut-off-trees-for-golf-event "Cut Off Trees for Golf Event")

[Next >](https://github.com/openset/leetcode/tree/master/problems/map-sum-pairs "Map Sum Pairs")

## 676. Implement Magic Dictionary (Medium)

<p>
Expand Down
4 changes: 4 additions & 0 deletions problems/implement-queue-using-stacks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/power-of-two "Power of Two")

[Next >](https://github.com/openset/leetcode/tree/master/problems/number-of-digit-one "Number of Digit One")

## 232. Implement Queue using Stacks (Easy)

<p>Implement the following operations of a queue using stacks.</p>
Expand Down
4 changes: 4 additions & 0 deletions problems/implement-rand10-using-rand7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/convex-polygon "Convex Polygon")

[Next >](https://github.com/openset/leetcode/tree/master/problems/encode-string-with-shortest-length "Encode String with Shortest Length")

## 470. Implement Rand10() Using Rand7() (Medium)

<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>
Expand Down
4 changes: 4 additions & 0 deletions problems/implement-stack-using-queues/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/basic-calculator "Basic Calculator")

[Next >](https://github.com/openset/leetcode/tree/master/problems/invert-binary-tree "Invert Binary Tree")

## 225. Implement Stack using Queues (Easy)

<p>Implement the following operations of a stack using queues.</p>
Expand Down
4 changes: 4 additions & 0 deletions problems/implement-strstr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/remove-element "Remove Element")

[Next >](https://github.com/openset/leetcode/tree/master/problems/divide-two-integers "Divide Two Integers")

## 28. Implement strStr() (Easy)

<p>Implement <a href="http://www.cplusplus.com/reference/cstring/strstr/" target="_blank">strStr()</a>.</p>
Expand Down
4 changes: 4 additions & 0 deletions problems/implement-trie-prefix-tree/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/course-schedule "Course Schedule")

[Next >](https://github.com/openset/leetcode/tree/master/problems/minimum-size-subarray-sum "Minimum Size Subarray Sum")

## 208. Implement Trie (Prefix Tree) (Medium)

<p>Implement a trie with <code>insert</code>, <code>search</code>, and <code>startsWith</code> methods.</p>
Expand Down
4 changes: 4 additions & 0 deletions problems/increasing-triplet-subsequence/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/largest-bst-subtree "Largest BST Subtree")

[Next >](https://github.com/openset/leetcode/tree/master/problems/self-crossing "Self Crossing")

## 334. Increasing Triplet Subsequence (Medium)

<p>Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array.</p>
Expand Down
4 changes: 4 additions & 0 deletions problems/inorder-successor-in-bst-ii/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/fibonacci-number "Fibonacci Number")

[Next >](https://github.com/openset/leetcode/tree/master/problems/find-bottom-left-tree-value "Find Bottom Left Tree Value")

## 510. Inorder Successor in BST II (Medium)


Expand Down
4 changes: 4 additions & 0 deletions problems/inorder-successor-in-bst/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/peeking-iterator "Peeking Iterator")

[Next >](https://github.com/openset/leetcode/tree/master/problems/walls-and-gates "Walls and Gates")

## 285. Inorder Successor in BST (Medium)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/insert-delete-getrandom-o1 "Insert Delete GetRandom O(1)")

[Next >](https://github.com/openset/leetcode/tree/master/problems/linked-list-random-node "Linked List Random Node")

## 381. Insert Delete GetRandom O(1) - Duplicates allowed (Hard)

<p>Design a data structure that supports all following operations in <i>average</i> <b>O(1)</b> time.</p>
Expand Down
4 changes: 4 additions & 0 deletions problems/insert-delete-getrandom-o1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/design-phone-directory "Design Phone Directory")

[Next >](https://github.com/openset/leetcode/tree/master/problems/insert-delete-getrandom-o1-duplicates-allowed "Insert Delete GetRandom O(1) - Duplicates allowed")

## 380. Insert Delete GetRandom O(1) (Medium)

<p>Design a data structure that supports all following operations in <i>average</i> <b>O(1)</b> time.</p>
Expand Down
4 changes: 4 additions & 0 deletions problems/insert-interval/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/merge-intervals "Merge Intervals")

[Next >](https://github.com/openset/leetcode/tree/master/problems/length-of-last-word "Length of Last Word")

## 57. Insert Interval (Hard)

<p>Given a set of <em>non-overlapping</em> intervals, insert a new interval into the intervals (merge if necessary).</p>
Expand Down
4 changes: 4 additions & 0 deletions problems/insert-into-a-binary-search-tree/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/search-in-a-binary-search-tree "Search in a Binary Search Tree")

[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")

## 701. Insert into a Binary Search Tree (Medium)

<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>
Expand Down
4 changes: 4 additions & 0 deletions problems/insert-into-a-cyclic-sorted-list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/design-linked-list "Design Linked List")

[Next >](https://github.com/openset/leetcode/tree/master/problems/to-lower-case "To Lower Case")

## 708. Insert into a Cyclic Sorted List (Medium)


Expand Down
4 changes: 4 additions & 0 deletions problems/insertion-sort-list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/lru-cache "LRU Cache")

[Next >](https://github.com/openset/leetcode/tree/master/problems/sort-list "Sort List")

## 147. Insertion Sort List (Medium)

<p>Sort a linked list using insertion sort.</p>
Expand Down
4 changes: 4 additions & 0 deletions problems/integer-replacement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/rotate-function "Rotate Function")

[Next >](https://github.com/openset/leetcode/tree/master/problems/random-pick-index "Random Pick Index")

## 397. Integer Replacement (Medium)

<p>
Expand Down
4 changes: 4 additions & 0 deletions problems/integer-to-roman/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/container-with-most-water "Container With Most Water")

[Next >](https://github.com/openset/leetcode/tree/master/problems/roman-to-integer "Roman to Integer")

## 12. Integer to Roman (Medium)

<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>
Expand Down
4 changes: 4 additions & 0 deletions problems/intersection-of-two-arrays-ii/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/intersection-of-two-arrays "Intersection of Two Arrays")

[Next >](https://github.com/openset/leetcode/tree/master/problems/android-unlock-patterns "Android Unlock Patterns")

## 350. Intersection of Two Arrays II (Easy)

<p>Given two arrays, write a function to compute their intersection.</p>
Expand Down
4 changes: 4 additions & 0 deletions problems/intersection-of-two-arrays/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/design-tic-tac-toe "Design Tic-Tac-Toe")

[Next >](https://github.com/openset/leetcode/tree/master/problems/intersection-of-two-arrays-ii "Intersection of Two Arrays II")

## 349. Intersection of Two Arrays (Easy)

<p>Given two arrays, write a function to compute their intersection.</p>
Expand Down
4 changes: 4 additions & 0 deletions problems/intersection-of-two-linked-lists/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< 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")

[Next >](https://github.com/openset/leetcode/tree/master/problems/one-edit-distance "One Edit Distance")

## 160. Intersection of Two Linked Lists (Easy)

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