Skip to content

Commit dbe67f1

Browse files
committed
Design series for random o of 1
1 parent c04cabd commit dbe67f1

13 files changed

+316
-38
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# **[LeetCode Records](https://leetcode.com/u/Zanger/)** (394 solved)
1+
# **[LeetCode Records](https://leetcode.com/u/Zanger/)** (396 solved)
22

33
> My LeetCode Profile: [Zanger](https://leetcode.com/u/Zanger/)
44
@@ -28,7 +28,7 @@ This repo is a collection of my LeetCode solutions, primarily written in Python,
2828

2929
------
3030

31-
[Array](<markdowns/by_topic/Array.md>), [String](<markdowns/by_topic/String.md>), [Hash Table](<markdowns/by_topic/Hash Table.md>), [Depth-First Search](<markdowns/by_topic/Depth-First Search.md>), [Tree](<markdowns/by_topic/Tree.md>), [Binary Tree](<markdowns/by_topic/Binary Tree.md>), [Sorting](<markdowns/by_topic/Sorting.md>), [Breadth-First Search](<markdowns/by_topic/Breadth-First Search.md>), [Math](<markdowns/by_topic/Math.md>), [Two Pointers](<markdowns/by_topic/Two Pointers.md>), [Linked List](<markdowns/by_topic/Linked List.md>), [Stack](<markdowns/by_topic/Stack.md>), [Greedy](<markdowns/by_topic/Greedy.md>), [Matrix](<markdowns/by_topic/Matrix.md>), [Simulation](<markdowns/by_topic/Simulation.md>), [Bit Manipulation](<markdowns/by_topic/Bit Manipulation.md>), [Dynamic Programming](<markdowns/by_topic/Dynamic Programming.md>), [Design](<markdowns/by_topic/Design.md>), [Database](<markdowns/by_topic/Database.md>), [Binary Search](<markdowns/by_topic/Binary Search.md>), [Trie](<markdowns/by_topic/Trie.md>), [Heap (Priority Queue)](<markdowns/by_topic/Heap (Priority Queue).md>), [Counting](<markdowns/by_topic/Counting.md>), [Recursion](<markdowns/by_topic/Recursion.md>), [Backtracking](<markdowns/by_topic/Backtracking.md>), [Binary Search Tree](<markdowns/by_topic/Binary Search Tree.md>), [Sliding Window](<markdowns/by_topic/Sliding Window.md>), [Prefix Sum](<markdowns/by_topic/Prefix Sum.md>), [Monotonic Stack](<markdowns/by_topic/Monotonic Stack.md>), [Queue](<markdowns/by_topic/Queue.md>), [Union Find](<markdowns/by_topic/Union Find.md>), [Divide and Conquer](<markdowns/by_topic/Divide and Conquer.md>), [String Matching](<markdowns/by_topic/String Matching.md>), [Graph](<markdowns/by_topic/Graph.md>), [Hash Function](<markdowns/by_topic/Hash Function.md>), [Combinatorics](<markdowns/by_topic/Combinatorics.md>), [Monotonic Queue](<markdowns/by_topic/Monotonic Queue.md>), [Iterator](<markdowns/by_topic/Iterator.md>), [Bucket Sort](<markdowns/by_topic/Bucket Sort.md>), [Geometry](<markdowns/by_topic/Geometry.md>), [Counting Sort](<markdowns/by_topic/Counting Sort.md>), [Brainteaser](<markdowns/by_topic/Brainteaser.md>), [Game Theory](<markdowns/by_topic/Game Theory.md>), [Interactive](<markdowns/by_topic/Interactive.md>), [Memoization](<markdowns/by_topic/Memoization.md>), [Rolling Hash](<markdowns/by_topic/Rolling Hash.md>), [Quickselect](<markdowns/by_topic/Quickselect.md>), [Randomized](<markdowns/by_topic/Randomized.md>), [Doubly-Linked List](<markdowns/by_topic/Doubly-Linked List.md>), [Data Stream](<markdowns/by_topic/Data Stream.md>), [Bitmask](<markdowns/by_topic/Bitmask.md>), [Merge Sort](<markdowns/by_topic/Merge Sort.md>), [Ordered Set](<markdowns/by_topic/Ordered Set.md>), [Suffix Array](<markdowns/by_topic/Suffix Array.md>), [Topological Sort](<markdowns/by_topic/Topological Sort.md>), [Shortest Path](<markdowns/by_topic/Shortest Path.md>), [Number Theory](<markdowns/by_topic/Number Theory.md>), [Reservoir Sampling](<markdowns/by_topic/Reservoir Sampling.md>)
31+
[Array](<markdowns/by_topic/Array.md>), [Hash Table](<markdowns/by_topic/Hash Table.md>), [String](<markdowns/by_topic/String.md>), [Depth-First Search](<markdowns/by_topic/Depth-First Search.md>), [Tree](<markdowns/by_topic/Tree.md>), [Binary Tree](<markdowns/by_topic/Binary Tree.md>), [Sorting](<markdowns/by_topic/Sorting.md>), [Math](<markdowns/by_topic/Math.md>), [Breadth-First Search](<markdowns/by_topic/Breadth-First Search.md>), [Two Pointers](<markdowns/by_topic/Two Pointers.md>), [Linked List](<markdowns/by_topic/Linked List.md>), [Stack](<markdowns/by_topic/Stack.md>), [Greedy](<markdowns/by_topic/Greedy.md>), [Matrix](<markdowns/by_topic/Matrix.md>), [Simulation](<markdowns/by_topic/Simulation.md>), [Bit Manipulation](<markdowns/by_topic/Bit Manipulation.md>), [Design](<markdowns/by_topic/Design.md>), [Dynamic Programming](<markdowns/by_topic/Dynamic Programming.md>), [Database](<markdowns/by_topic/Database.md>), [Binary Search](<markdowns/by_topic/Binary Search.md>), [Trie](<markdowns/by_topic/Trie.md>), [Heap (Priority Queue)](<markdowns/by_topic/Heap (Priority Queue).md>), [Counting](<markdowns/by_topic/Counting.md>), [Recursion](<markdowns/by_topic/Recursion.md>), [Backtracking](<markdowns/by_topic/Backtracking.md>), [Binary Search Tree](<markdowns/by_topic/Binary Search Tree.md>), [Sliding Window](<markdowns/by_topic/Sliding Window.md>), [Prefix Sum](<markdowns/by_topic/Prefix Sum.md>), [Monotonic Stack](<markdowns/by_topic/Monotonic Stack.md>), [Queue](<markdowns/by_topic/Queue.md>), [Union Find](<markdowns/by_topic/Union Find.md>), [Divide and Conquer](<markdowns/by_topic/Divide and Conquer.md>), [String Matching](<markdowns/by_topic/String Matching.md>), [Graph](<markdowns/by_topic/Graph.md>), [Hash Function](<markdowns/by_topic/Hash Function.md>), [Combinatorics](<markdowns/by_topic/Combinatorics.md>), [Randomized](<markdowns/by_topic/Randomized.md>), [Monotonic Queue](<markdowns/by_topic/Monotonic Queue.md>), [Iterator](<markdowns/by_topic/Iterator.md>), [Bucket Sort](<markdowns/by_topic/Bucket Sort.md>), [Geometry](<markdowns/by_topic/Geometry.md>), [Counting Sort](<markdowns/by_topic/Counting Sort.md>), [Brainteaser](<markdowns/by_topic/Brainteaser.md>), [Game Theory](<markdowns/by_topic/Game Theory.md>), [Interactive](<markdowns/by_topic/Interactive.md>), [Memoization](<markdowns/by_topic/Memoization.md>), [Rolling Hash](<markdowns/by_topic/Rolling Hash.md>), [Quickselect](<markdowns/by_topic/Quickselect.md>), [Doubly-Linked List](<markdowns/by_topic/Doubly-Linked List.md>), [Data Stream](<markdowns/by_topic/Data Stream.md>), [Bitmask](<markdowns/by_topic/Bitmask.md>), [Merge Sort](<markdowns/by_topic/Merge Sort.md>), [Ordered Set](<markdowns/by_topic/Ordered Set.md>), [Suffix Array](<markdowns/by_topic/Suffix Array.md>), [Topological Sort](<markdowns/by_topic/Topological Sort.md>), [Shortest Path](<markdowns/by_topic/Shortest Path.md>), [Number Theory](<markdowns/by_topic/Number Theory.md>), [Reservoir Sampling](<markdowns/by_topic/Reservoir Sampling.md>)
3232

3333
------
3434

@@ -153,6 +153,8 @@ This repo is a collection of my LeetCode solutions, primarily written in Python,
153153
| 366 | [Find Leaves of Binary Tree](<https://leetcode.com/problems/find-leaves-of-binary-tree>) | Medium | | [solution](<markdowns/_366. Find Leaves of Binary Tree.md>) | py |
154154
| 369 | [Plus One Linked List](<https://leetcode.com/problems/plus-one-linked-list>) | Medium | | [solution](<markdowns/_369. Plus One Linked List.md>) | c |
155155
| 374 | [Guess Number Higher or Lower](<https://leetcode.com/problems/guess-number-higher-or-lower>) | Easy | | [solution](<markdowns/_374. Guess Number Higher or Lower.md>) | py, java |
156+
| 380 | [Insert Delete GetRandom O(1)](<https://leetcode.com/problems/insert-delete-getrandom-o1>) | Medium | | [solution](<markdowns/_380. Insert Delete GetRandom O(1).md>) | java |
157+
| 381 | [Insert Delete GetRandom O(1) - Duplicates allowed](<https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed>) | Hard | | [solution](<markdowns/_381. Insert Delete GetRandom O(1) - Duplicates allowed.md>) | java |
156158
| 382 | [Linked List Random Node](<https://leetcode.com/problems/linked-list-random-node>) | Medium | | [solution](<markdowns/_382. Linked List Random Node.md>) | py, java, c |
157159
| 384 | [Shuffle an Array](<https://leetcode.com/problems/shuffle-an-array>) | Medium | | [solution](<markdowns/_384. Shuffle an Array.md>) | py |
158160
| 392 | [Is Subsequence](<https://leetcode.com/problems/is-subsequence>) | Easy | | [solution](<markdowns/_392. Is Subsequence.md>) | java |

markdowns/Questions_By_Code_Length.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Calculations are based on the code files's byte sizes.
8383
| 611 | [Valid Triangle Number](<https://leetcode.com/problems/valid-triangle-number>) | Medium | | [solution](<_611. Valid Triangle Number.md>) | py | May 22, 2024 |
8484
| 353 | [Design Snake Game](<https://leetcode.com/problems/design-snake-game>) | Medium | | [solution](<_353. Design Snake Game.md>) | py | Jun 28, 2024 |
8585
| 111 | [Minimum Depth of Binary Tree](<https://leetcode.com/problems/minimum-depth-of-binary-tree>) | Easy | | [solution](<_111. Minimum Depth of Binary Tree.md>) | java, c | Jun 07, 2024 |
86+
| 381 | [Insert Delete GetRandom O(1) - Duplicates allowed](<https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed>) | Hard | | [solution](<_381. Insert Delete GetRandom O(1) - Duplicates allowed.md>) | java | Jul 05, 2024 |
8687
| 1006 | [Clumsy Factorial](<https://leetcode.com/problems/clumsy-factorial>) | Medium | | [solution](<_1006. Clumsy Factorial.md>) | py, c | Jun 11, 2024 |
8788
| 419 | [Battleships in a Board](<https://leetcode.com/problems/battleships-in-a-board>) | Medium | | [solution](<_419. Battleships in a Board.md>) | py, c | Jun 23, 2024 |
8889
| 1372 | [Longest ZigZag Path in a Binary Tree](<https://leetcode.com/problems/longest-zigzag-path-in-a-binary-tree>) | Medium | | [solution](<_1372. Longest ZigZag Path in a Binary Tree.md>) | py | Jul 05, 2024 |
@@ -130,6 +131,7 @@ Calculations are based on the code files's byte sizes.
130131
| 708 | [Insert into a Sorted Circular Linked List](<https://leetcode.com/problems/insert-into-a-sorted-circular-linked-list>) | Medium | | [solution](<_708. Insert into a Sorted Circular Linked List.md>) | py | Jun 21, 2024 |
131132
| 1255 | [Maximum Score Words Formed by Letters](<https://leetcode.com/problems/maximum-score-words-formed-by-letters>) | Hard | | [solution](<_1255. Maximum Score Words Formed by Letters.md>) | py | Jun 15, 2024 |
132133
| 1698 | [Number of Distinct Substrings in a String](<https://leetcode.com/problems/number-of-distinct-substrings-in-a-string>) | Medium | | [solution](<_1698. Number of Distinct Substrings in a String.md>) | py, java | Jun 01, 2024 |
134+
| 380 | [Insert Delete GetRandom O(1)](<https://leetcode.com/problems/insert-delete-getrandom-o1>) | Medium | | [solution](<_380. Insert Delete GetRandom O(1).md>) | java | Jul 05, 2024 |
133135
| 107 | [Binary Tree Level Order Traversal II](<https://leetcode.com/problems/binary-tree-level-order-traversal-ii>) | Medium | | [solution](<_107. Binary Tree Level Order Traversal II.md>) | java | Jul 03, 2024 |
134136
| 238 | [Product of Array Except Self](<https://leetcode.com/problems/product-of-array-except-self>) | Medium | N150, B75 | [solution](<_238. Product of Array Except Self.md>) | py | Jun 12, 2024 |
135137
| 450 | [Delete Node in a BST](<https://leetcode.com/problems/delete-node-in-a-bst>) | Medium | | [solution](<_450. Delete Node in a BST.md>) | py | Jun 28, 2024 |

markdowns/Questions_By_Recent.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Calculations are based on the date of the first solve.
66

77
| # | Title | Level | Cats | Solution | Languages | Date Complete |
88
|-----:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------|:---------------|:---------------------------------------------------------------------------------------------------|:---------------------------------|:----------------|
9+
| 380 | [Insert Delete GetRandom O(1)](<https://leetcode.com/problems/insert-delete-getrandom-o1>) | Medium | | [solution](<_380. Insert Delete GetRandom O(1).md>) | java | Jul 05, 2024 |
10+
| 381 | [Insert Delete GetRandom O(1) - Duplicates allowed](<https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed>) | Hard | | [solution](<_381. Insert Delete GetRandom O(1) - Duplicates allowed.md>) | java | Jul 05, 2024 |
911
| 2582 | [Pass the Pillow](<https://leetcode.com/problems/pass-the-pillow>) | Easy | Daily | [solution](<_2582. Pass the Pillow.md>) | py, java, cs, js, cpp, c | Jul 05, 2024 |
1012
| 424 | [Longest Repeating Character Replacement](<https://leetcode.com/problems/longest-repeating-character-replacement>) | Medium | N150, B75 | [solution](<_424. Longest Repeating Character Replacement.md>) | py | Jul 05, 2024 |
1113
| 503 | [Next Greater Element II](<https://leetcode.com/problems/next-greater-element-ii>) | Medium | | [solution](<_503. Next Greater Element II.md>) | py | Jul 05, 2024 |

markdowns/Topics.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@
44

55
------
66

7-
- [Array](<by_topic/Array.md>) (176 completed)
7+
- [Array](<by_topic/Array.md>) (178 completed)
8+
- [Hash Table](<by_topic/Hash Table.md>) (88 completed)
89
- [String](<by_topic/String.md>) (87 completed)
9-
- [Hash Table](<by_topic/Hash Table.md>) (86 completed)
1010
- [Depth-First Search](<by_topic/Depth-First Search.md>) (68 completed)
1111
- [Tree](<by_topic/Tree.md>) (66 completed)
1212
- [Binary Tree](<by_topic/Binary Tree.md>) (61 completed)
1313
- [Sorting](<by_topic/Sorting.md>) (55 completed)
14+
- [Math](<by_topic/Math.md>) (49 completed)
1415
- [Breadth-First Search](<by_topic/Breadth-First Search.md>) (47 completed)
15-
- [Math](<by_topic/Math.md>) (47 completed)
1616
- [Two Pointers](<by_topic/Two Pointers.md>) (43 completed)
1717
- [Linked List](<by_topic/Linked List.md>) (38 completed)
1818
- [Stack](<by_topic/Stack.md>) (35 completed)
1919
- [Greedy](<by_topic/Greedy.md>) (31 completed)
2020
- [Matrix](<by_topic/Matrix.md>) (30 completed)
2121
- [Simulation](<by_topic/Simulation.md>) (26 completed)
2222
- [Bit Manipulation](<by_topic/Bit Manipulation.md>) (24 completed)
23+
- [Design](<by_topic/Design.md>) (22 completed)
2324
- [Dynamic Programming](<by_topic/Dynamic Programming.md>) (20 completed)
24-
- [Design](<by_topic/Design.md>) (20 completed)
2525
- [Database](<by_topic/Database.md>) (18 completed)
2626
- [Binary Search](<by_topic/Binary Search.md>) (18 completed)
2727
- [Trie](<by_topic/Trie.md>) (18 completed)
@@ -40,6 +40,7 @@
4040
- [Graph](<by_topic/Graph.md>) (6 completed)
4141
- [Hash Function](<by_topic/Hash Function.md>) (4 completed)
4242
- [Combinatorics](<by_topic/Combinatorics.md>) (4 completed)
43+
- [Randomized](<by_topic/Randomized.md>) (4 completed)
4344
- [Monotonic Queue](<by_topic/Monotonic Queue.md>) (3 completed)
4445
- [Iterator](<by_topic/Iterator.md>) (3 completed)
4546
- [Bucket Sort](<by_topic/Bucket Sort.md>) (3 completed)
@@ -51,7 +52,6 @@
5152
- [Memoization](<by_topic/Memoization.md>) (2 completed)
5253
- [Rolling Hash](<by_topic/Rolling Hash.md>) (2 completed)
5354
- [Quickselect](<by_topic/Quickselect.md>) (2 completed)
54-
- [Randomized](<by_topic/Randomized.md>) (2 completed)
5555
- [Doubly-Linked List](<by_topic/Doubly-Linked List.md>) (2 completed)
5656
- [Data Stream](<by_topic/Data Stream.md>) (1 completed)
5757
- [Bitmask](<by_topic/Bitmask.md>) (1 completed)

0 commit comments

Comments
 (0)