vault backup: 2022-09-03 15:17:24
This commit is contained in:
parent
4c3b8a0335
commit
80a409b0c1
17
.obsidian/graph.json
vendored
17
.obsidian/graph.json
vendored
|
@ -7,6 +7,13 @@
|
|||
"showOrphans": false,
|
||||
"collapse-color-groups": false,
|
||||
"colorGroups": [
|
||||
{
|
||||
"query": "tag:#coding_problem",
|
||||
"color": {
|
||||
"a": 1,
|
||||
"rgb": 6523645
|
||||
}
|
||||
},
|
||||
{
|
||||
"query": "tag:#CS_analysis",
|
||||
"color": {
|
||||
|
@ -15,15 +22,15 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"query": "tag:#leetcode",
|
||||
"query": "tag:#TODO",
|
||||
"color": {
|
||||
"a": 1,
|
||||
"rgb": 1673572
|
||||
"rgb": 14701138
|
||||
}
|
||||
}
|
||||
],
|
||||
"collapse-display": false,
|
||||
"showArrow": true,
|
||||
"showArrow": false,
|
||||
"textFadeMultiplier": 0,
|
||||
"nodeSizeMultiplier": 1,
|
||||
"lineSizeMultiplier": 1,
|
||||
|
@ -32,6 +39,6 @@
|
|||
"repelStrength": 10,
|
||||
"linkStrength": 1,
|
||||
"linkDistance": 250,
|
||||
"scale": 0.8153718570546561,
|
||||
"close": false
|
||||
"scale": 0.7798887840302782,
|
||||
"close": true
|
||||
}
|
|
@ -14,215 +14,28 @@ This is where I store notes about CS
|
|||
___
|
||||
|
||||
## Lists
|
||||
#### Needs more understandings #CS_list_need_understanding
|
||||
```expander
|
||||
tag:#CS_list_need_understanding
|
||||
- [ ] [[$filename]]
|
||||
```
|
||||
|
||||
- [ ] [[Leetcode Binary-Tree-Preorder-Traversal]]
|
||||
- [ ] [[Leetcode Implement-Queue-Using-Stacks]]
|
||||
- [ ] [[Leetcode Reverse-Linked-List]]
|
||||
- [ ] [[Leetcode Rotate-Array]]
|
||||
|
||||
|
||||
|
||||
#### Needs practicing #CS_list_need_practicing
|
||||
```expander
|
||||
tag:#CS_list_need_practicing
|
||||
- [ ] [[$filename]]
|
||||
```
|
||||
|
||||
- [ ] [[Leetcode Binary-Search]]
|
||||
- [ ] [[Leetcode Binary-Tree-Postorder-Traversal]]
|
||||
- [ ] [[Leetcode Reverse-Linked-List]]
|
||||
- [ ] [[Leetcode Rotate-Array]]
|
||||
- [ ] [[Leetcode Validate-Binary-Search-Tree]]
|
||||
|
||||
|
||||
|
||||
#### Needs more understandings
|
||||
#CS_list_need_understanding
|
||||
#### Needs practicing
|
||||
#CS_list_need_practicing
|
||||
## Websites
|
||||
|
||||
#### [leetcode.com](https://leetcode.com)
|
||||
#leetcode
|
||||
|
||||
```expander
|
||||
tag:#leetcode
|
||||
- [[$filename]]
|
||||
```
|
||||
|
||||
- [[Leetcode Best-Time-To-Buy-And-Sell-Stock]]
|
||||
- [[Leetcode Binary-Search]]
|
||||
- [[Leetcode Binary-Tree-Inorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Level-Order-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Postorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Preorder-Traversal]]
|
||||
- [[Leetcode First-Bad-Version]]
|
||||
- [[Leetcode First-Unique-Character-In-a-String]]
|
||||
- [[Leetcode Implement-Queue-Using-Stacks]]
|
||||
- [[Leetcode Insert-Into-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Intersection-of-Two-Arrays-II]]
|
||||
- [[Leetcode Invert-Binary-Tree]]
|
||||
- [[Leetcode Linked-List-Cycle]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Maximum-Depth-Of-Binary-Tree]]
|
||||
- [[Leetcode Maximum-Difference-Between-Increasing-Elements]]
|
||||
- [[Leetcode Maxinum-subarray]]
|
||||
- [[Leetcode Merge-Sorted-Array]]
|
||||
- [[Leetcode Merge-Two-Sorted-Lists]]
|
||||
- [[Leetcode Pascal's-Triangle]]
|
||||
- [[Leetcode Path-Sum]]
|
||||
- [[Leetcode Ransom-Note]]
|
||||
- [[Leetcode Remove-Duplicates-From-Sorted-List]]
|
||||
- [[Leetcode Remove-Linked-List-Elements]]
|
||||
- [[Leetcode Reshape-The-Matrix]]
|
||||
- [[Leetcode Reverse-Linked-List]]
|
||||
- [[Leetcode Rotate-Array]]
|
||||
- [[Leetcode Search-a-2D-Matrix]]
|
||||
- [[Leetcode Search-In-a-Binary-Tree]]
|
||||
- [[Leetcode Search-Insert-Position]]
|
||||
- [[Leetcode Squares-of-a-Sorted-Array]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
- [[Leetcode Two-Sum]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
- [[Leetcode Valid-Anagram]]
|
||||
- [[Leetcode Valid-Parentheses]]
|
||||
- [[Leetcode Valid-Sudoku]]
|
||||
- [[Leetcode Validate-Binary-Search-Tree]]
|
||||
|
||||
|
||||
|
||||
#### [hackerearth.com](https://www.hackerearth.com/)
|
||||
#hackerearth
|
||||
|
||||
```expander
|
||||
tag:#hackerearch
|
||||
- [[$filename]]
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
___
|
||||
## Data Structure
|
||||
#DS
|
||||
#### Coding problems
|
||||
```expander
|
||||
tag:#DS tag:#coding_problem -tag:#template_remove_me
|
||||
- [[$filename]]
|
||||
```
|
||||
|
||||
- [[Leetcode Best-Time-To-Buy-And-Sell-Stock]]
|
||||
- [[Leetcode Binary-Search]]
|
||||
- [[Leetcode Binary-Tree-Inorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Level-Order-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Postorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Preorder-Traversal]]
|
||||
- [[Leetcode First-Bad-Version]]
|
||||
- [[Leetcode First-Unique-Character-In-a-String]]
|
||||
- [[Leetcode Implement-Queue-Using-Stacks]]
|
||||
- [[Leetcode Insert-Into-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Intersection-of-Two-Arrays-II]]
|
||||
- [[Leetcode Invert-Binary-Tree]]
|
||||
- [[Leetcode Linked-List-Cycle]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Maximum-Depth-Of-Binary-Tree]]
|
||||
- [[Leetcode Maxinum-subarray]]
|
||||
- [[Leetcode Merge-Sorted-Array]]
|
||||
- [[Leetcode Merge-Two-Sorted-Lists]]
|
||||
- [[Leetcode Pascal's-Triangle]]
|
||||
- [[Leetcode Path-Sum]]
|
||||
- [[Leetcode Ransom-Note]]
|
||||
- [[Leetcode Remove-Duplicates-From-Sorted-List]]
|
||||
- [[Leetcode Remove-Linked-List-Elements]]
|
||||
- [[Leetcode Reshape-The-Matrix]]
|
||||
- [[Leetcode Reverse-Linked-List]]
|
||||
- [[Leetcode Rotate-Array]]
|
||||
- [[Leetcode Search-a-2D-Matrix]]
|
||||
- [[Leetcode Search-In-a-Binary-Tree]]
|
||||
- [[Leetcode Search-Insert-Position]]
|
||||
- [[Leetcode Squares-of-a-Sorted-Array]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
- [[Leetcode Two-Sum]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
- [[Leetcode Valid-Anagram]]
|
||||
- [[Leetcode Valid-Parentheses]]
|
||||
- [[Leetcode Valid-Sudoku]]
|
||||
- [[Leetcode Validate-Binary-Search-Tree]]
|
||||
|
||||
|
||||
|
||||
#coding_problem
|
||||
#### Analysis
|
||||
```expander
|
||||
tag:#DS tag:#CS_analysis -tag:#template_remove_me
|
||||
- [[$filename]]
|
||||
```
|
||||
|
||||
- [[Breadth First Search]]
|
||||
- [[cpp_Range_based_for_loop]]
|
||||
- [[cpp_std_multiset]]
|
||||
- [[cpp_std_unordered_map]]
|
||||
|
||||
#CS_analysis
|
||||
|
||||
|
||||
___
|
||||
## Algorithm
|
||||
#algorithm
|
||||
#### Coding problems
|
||||
```expander
|
||||
tag:#algorithm tag:#coding_problem -tag:#template_remove_me
|
||||
- [[$filename]]
|
||||
```
|
||||
|
||||
- [[Leetcode Best-Time-To-Buy-And-Sell-Stock]]
|
||||
- [[Leetcode Binary-Search]]
|
||||
- [[Leetcode Binary-Tree-Inorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Level-Order-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Postorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Preorder-Traversal]]
|
||||
- [[Leetcode First-Bad-Version]]
|
||||
- [[Leetcode First-Unique-Character-In-a-String]]
|
||||
- [[Leetcode Insert-Into-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Intersection-of-Two-Arrays-II]]
|
||||
- [[Leetcode Invert-Binary-Tree]]
|
||||
- [[Leetcode Linked-List-Cycle]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Maximum-Depth-Of-Binary-Tree]]
|
||||
- [[Leetcode Maximum-Difference-Between-Increasing-Elements]]
|
||||
- [[Leetcode Maxinum-subarray]]
|
||||
- [[Leetcode Merge-Sorted-Array]]
|
||||
- [[Leetcode Merge-Two-Sorted-Lists]]
|
||||
- [[Leetcode Pascal's-Triangle]]
|
||||
- [[Leetcode Path-Sum]]
|
||||
- [[Leetcode Ransom-Note]]
|
||||
- [[Leetcode Reverse-Linked-List]]
|
||||
- [[Leetcode Rotate-Array]]
|
||||
- [[Leetcode Search-a-2D-Matrix]]
|
||||
- [[Leetcode Search-In-a-Binary-Tree]]
|
||||
- [[Leetcode Search-Insert-Position]]
|
||||
- [[Leetcode Squares-of-a-Sorted-Array]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
- [[Leetcode Two-Sum]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
- [[Leetcode Valid-Anagram]]
|
||||
- [[Leetcode Validate-Binary-Search-Tree]]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#coding_problem
|
||||
#### Analysis
|
||||
|
||||
```expander
|
||||
tag:#algorithm tag:#CS_analysis -tag:#template_remove_me
|
||||
- [[$filename]]
|
||||
```
|
||||
|
||||
- [[Binary Search Algorithm]]
|
||||
- [[Breadth First Search]]
|
||||
- [[cpp_std_sort]]
|
||||
- [[Floyd's Cycle Finding Algorithm]]
|
||||
- [[Kadane's Algorithm]]
|
||||
- [[Two pointers approach]]
|
||||
|
||||
|
||||
|
||||
|
||||
#CS_analysis
|
|
@ -10,18 +10,6 @@ ___
|
|||
##### Difficulty:
|
||||
#CS_analysis #difficulty-easy
|
||||
##### Related problems:
|
||||
```expander
|
||||
tag:#coding_problem tag:#binary_search -tag:#template_remove_me
|
||||
```
|
||||
|
||||
- [[Leetcode Binary-Search]]
|
||||
- [[Leetcode First-Bad-Version]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Search-a-2D-Matrix]]
|
||||
- [[Leetcode Search-Insert-Position]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [g4g for manual implementation](https://www.geeksforgeeks.org/binary-search/)
|
||||
- [cppreference, find](https://en.cppreference.com/w/cpp/container/set/find)
|
||||
|
|
|
@ -12,13 +12,6 @@
|
|||
>
|
||||
|
||||
##### Related problems:
|
||||
```expander
|
||||
tag:#coding_problem tag:#bit_manipulation -tag:#template_remove_me
|
||||
```
|
||||
|
||||
|
||||
___
|
||||
|
||||
### What is Bit-Manipulation count true trick?
|
||||
|
||||
(n & (n - 1))
|
||||
|
|
|
@ -12,17 +12,6 @@
|
|||
>
|
||||
|
||||
##### Related problems:
|
||||
```expander
|
||||
tag:#coding_problem tag:#BFS -tag:#template_remove_me
|
||||
```
|
||||
|
||||
- [[Leetcode Binary-Tree-Level-Order-Traversal]]
|
||||
- [[Leetcode Maximum-Depth-Of-Binary-Tree]]
|
||||
- [[Leetcode Search-In-a-Binary-Tree]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [cppreference]()
|
||||
___
|
||||
|
|
|
@ -10,13 +10,6 @@ ___
|
|||
##### Difficulty:
|
||||
#CS_analysis #difficulty-easy
|
||||
##### Related problems:
|
||||
```expander
|
||||
tag:#coding_problem tag:#Floyd_s_cycle_finding_algorithm -tag:#template_remove_me
|
||||
```
|
||||
|
||||
- [[Leetcode Linked-List-Cycle]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [g4g](https://www.geeksforgeeks.org/floyds-cycle-finding-algorithm/)
|
||||
___
|
||||
|
|
|
@ -12,16 +12,6 @@
|
|||
##### Time complexity:
|
||||
O(n)
|
||||
##### Related problems:
|
||||
```expander
|
||||
tag:#coding_problem tag:#Kadane_s_algorithm -tag:#template_remove_me
|
||||
```
|
||||
|
||||
- [[Leetcode Best-Time-To-Buy-And-Sell-Stock]]
|
||||
- [[Leetcode Maximum-Difference-Between-Increasing-Elements]]
|
||||
- [[Leetcode Maxinum-subarray]]
|
||||
|
||||
|
||||
|
||||
##### Resources:
|
||||
- [Explainer article](https://medium.com/@rsinghal757/kadanes-algorithm-dynamic-programming-how-and-why-does-it-work-3fd8849ed73d)
|
||||
|
||||
|
|
|
@ -14,13 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#BFS
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/01-matrix/)
|
||||
___
|
||||
|
|
|
@ -10,12 +10,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#math
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/average-salary-excluding-the-minimum-and-maximum-salary/)
|
||||
___
|
||||
|
|
|
@ -10,16 +10,6 @@
|
|||
##### Difficulty:
|
||||
#leetcode #coding_problem #difficulty-easy
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#Kadane_s_algorithm
|
||||
```
|
||||
|
||||
- [[Kadane's Algorithm]]
|
||||
- [[Leetcode Maximum-Difference-Between-Increasing-Elements]]
|
||||
- [[Leetcode Maxinum-subarray]]
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)
|
||||
- [Kadane's Algo solution](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/solution/554875)
|
||||
|
|
|
@ -14,18 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#binary_search
|
||||
```
|
||||
|
||||
- [[Binary Search Algorithm]]
|
||||
- [[Leetcode First-Bad-Version]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Search-a-2D-Matrix]]
|
||||
- [[Leetcode Search-Insert-Position]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/binary-search/)
|
||||
___
|
||||
|
|
|
@ -14,22 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#DFS
|
||||
```
|
||||
|
||||
- [[Leetcode Binary-Tree-Postorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Preorder-Traversal]]
|
||||
- [[Leetcode Insert-Into-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Invert-Binary-Tree]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Maximum-Depth-Of-Binary-Tree]]
|
||||
- [[Leetcode Path-Sum]]
|
||||
- [[Leetcode Search-In-a-Binary-Tree]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
- [[Leetcode Validate-Binary-Search-Tree]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/binary-tree-inorder-traversal/)
|
||||
___
|
||||
|
|
|
@ -14,17 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#BFS
|
||||
```
|
||||
|
||||
- [[Breadth First Search]]
|
||||
- [[Leetcode Maximum-Depth-Of-Binary-Tree]]
|
||||
- [[Leetcode Search-In-a-Binary-Tree]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/binary-tree-level-order-traversal/)
|
||||
___
|
||||
|
|
|
@ -14,22 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#DFS
|
||||
```
|
||||
|
||||
- [[Leetcode Binary-Tree-Inorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Preorder-Traversal]]
|
||||
- [[Leetcode Insert-Into-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Invert-Binary-Tree]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Maximum-Depth-Of-Binary-Tree]]
|
||||
- [[Leetcode Path-Sum]]
|
||||
- [[Leetcode Search-In-a-Binary-Tree]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
- [[Leetcode Validate-Binary-Search-Tree]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/binary-tree-postorder-traversal/)
|
||||
___
|
||||
|
|
|
@ -14,22 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#DFS
|
||||
```
|
||||
|
||||
- [[Leetcode Binary-Tree-Inorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Postorder-Traversal]]
|
||||
- [[Leetcode Insert-Into-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Invert-Binary-Tree]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Maximum-Depth-Of-Binary-Tree]]
|
||||
- [[Leetcode Path-Sum]]
|
||||
- [[Leetcode Search-In-a-Binary-Tree]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
- [[Leetcode Validate-Binary-Search-Tree]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/binary-tree-preorder-traversal/)
|
||||
___
|
||||
|
|
|
@ -12,11 +12,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#math
|
||||
```
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/check-if-it-is-a-straight-line/)
|
||||
___
|
||||
|
|
|
@ -12,12 +12,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#dynamic_programming
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/climbing-stairs/submissions/)
|
||||
___
|
||||
|
|
|
@ -12,12 +12,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#backtrack
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/combinations/)
|
||||
- [Explanation](https://leetcode.com/problems/combinations/discuss/844096/Backtracking-cheatsheet-%2B-simple-solution)
|
||||
|
|
|
@ -12,12 +12,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#math
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/count-odd-numbers-in-an-interval-range/)
|
||||
___
|
||||
|
|
|
@ -14,18 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#binary_search
|
||||
```
|
||||
|
||||
- [[Binary Search Algorithm]]
|
||||
- [[Leetcode Binary-Search]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Search-a-2D-Matrix]]
|
||||
- [[Leetcode Search-Insert-Position]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/first-bad-version/)
|
||||
___
|
||||
|
|
|
@ -10,16 +10,6 @@
|
|||
##### Difficulty:
|
||||
#leetcode #coding_problem #difficulty-easy
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#string OR tag:#hash_table
|
||||
```
|
||||
|
||||
- [[cpp_std_unordered_map]]
|
||||
- [[Leetcode Ransom-Note]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
- [[Leetcode Valid-Anagram]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/first-unique-character-in-a-string/)
|
||||
___
|
||||
|
|
|
@ -14,11 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#BFS OR tag:#DFS
|
||||
```
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/flood-fill/)
|
||||
___
|
||||
|
|
|
@ -12,12 +12,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#Floyd_s_cycle_finding_algorithm
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/happy-number/)
|
||||
___
|
||||
|
|
|
@ -12,12 +12,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#dynamic_programming
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/house-robber/)
|
||||
- [Tutorial and explanation on DP](https://leetcode.com/problems/house-robber/discuss/156523/From-good-to-great.-How-to-approach-most-of-DP-problems.)
|
||||
|
|
|
@ -12,12 +12,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#stack tag:#queue
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/implement-queue-using-stacks/submissions/)
|
||||
___
|
||||
|
|
|
@ -14,22 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#DFS
|
||||
```
|
||||
|
||||
- [[Leetcode Binary-Tree-Inorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Postorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Preorder-Traversal]]
|
||||
- [[Leetcode Invert-Binary-Tree]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Maximum-Depth-Of-Binary-Tree]]
|
||||
- [[Leetcode Path-Sum]]
|
||||
- [[Leetcode Search-In-a-Binary-Tree]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
- [[Leetcode Validate-Binary-Search-Tree]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/insert-into-a-binary-search-tree/)
|
||||
___
|
||||
|
|
|
@ -11,20 +11,6 @@
|
|||
##### Difficulty:
|
||||
#leetcode #coding_problem #difficulty-easy
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#unordered_map OR tag:#two_pointers OR tag:#sort
|
||||
```
|
||||
|
||||
- [[cpp_std_sort]]
|
||||
- [[cpp_std_unordered_map]]
|
||||
- [[Leetcode Merge-Sorted-Array]]
|
||||
- [[Leetcode Merge-Two-Sorted-Lists]]
|
||||
- [[Leetcode Squares-of-a-Sorted-Array]]
|
||||
- [[Leetcode Two-Sum]]
|
||||
- [[Two pointers approach]]
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/intersection-of-two-arrays-ii/)
|
||||
- [Solution 2(two pointers method)](https://leetcode.com/problems/intersection-of-two-arrays-ii/discuss/846181/C%2B%2B-Solutions-or-1-%3A-Map-or-2-%3A-Two-Pointer-with-sort)
|
||||
|
|
|
@ -14,15 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#recursion tag:#DFS
|
||||
```
|
||||
|
||||
- [[Leetcode Insert-Into-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Path-Sum]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/invert-binary-tree/)
|
||||
___
|
||||
|
|
|
@ -12,12 +12,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#math
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/largest-perimeter-triangle/)
|
||||
___
|
||||
|
|
|
@ -12,12 +12,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#backtrack
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/letter-case-permutation/)
|
||||
___
|
||||
|
|
|
@ -10,13 +10,6 @@
|
|||
##### Difficulty:
|
||||
#leetcode #coding_problem #difficulty-easy
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#Floyd_s_cycle_finding_algorithm
|
||||
```
|
||||
|
||||
- [[Floyd's Cycle Finding Algorithm]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/linked-list-cycle/)
|
||||
___
|
||||
|
|
|
@ -14,11 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#Kadane_s_algorithm OR tag:#sliding_window
|
||||
```
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/longest-substring-without-repeating-characters/)
|
||||
___
|
||||
|
|
|
@ -14,14 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#binary_search_tree
|
||||
```
|
||||
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
- [[Leetcode Validate-Binary-Search-Tree]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/)
|
||||
___
|
||||
|
|
|
@ -14,12 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#BFS OF tag:#DFS
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/max-area-of-island/)
|
||||
___
|
||||
|
|
|
@ -14,17 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#BFS
|
||||
```
|
||||
|
||||
- [[Breadth First Search]]
|
||||
- [[Leetcode Binary-Tree-Level-Order-Traversal]]
|
||||
- [[Leetcode Search-In-a-Binary-Tree]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/maximum-depth-of-binary-tree/)
|
||||
___
|
||||
|
|
|
@ -12,15 +12,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#Kadane_s_algorithm
|
||||
```
|
||||
|
||||
- [[Kadane's Algorithm]]
|
||||
- [[Leetcode Best-Time-To-Buy-And-Sell-Stock]]
|
||||
- [[Leetcode Maxinum-subarray]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/maximum-difference-between-increasing-elements/)
|
||||
___
|
||||
|
|
|
@ -13,16 +13,6 @@
|
|||
- [Link to problem](https://leetcode.com/problems/maximum-subarray/)
|
||||
- [Analysis](https://medium.com/@rsinghal757/kadanes-algorithm-dynamic-programming-how-and-why-does-it-work-3fd8849ed73d)
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#Kadane_s_algorithm
|
||||
```
|
||||
|
||||
- [[Kadane's Algorithm]]
|
||||
- [[Leetcode Best-Time-To-Buy-And-Sell-Stock]]
|
||||
- [[Leetcode Maximum-Difference-Between-Increasing-Elements]]
|
||||
|
||||
|
||||
|
||||
### Problem
|
||||
Given an integer array `nums`, find the contiguous subarray (containing at least one number) which has the largest sum and return _its sum_.
|
||||
|
||||
|
|
|
@ -10,23 +10,6 @@
|
|||
##### Difficulty:
|
||||
#leetcode #coding_problem #difficulty-easy
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#set OR tag:#multiset OR tag:#merge_sort OR tag:#vector OR tag:#two_pointers
|
||||
```
|
||||
|
||||
- [[Binary Search Algorithm]]
|
||||
- [[cpp_Range_based_for_loop]]
|
||||
- [[cpp_std_multiset]]
|
||||
- [[Leetcode Intersection-of-Two-Arrays-II]]
|
||||
- [[Leetcode Merge-Two-Sorted-Lists]]
|
||||
- [[Leetcode Reshape-The-Matrix]]
|
||||
- [[Leetcode Search-a-2D-Matrix]]
|
||||
- [[Leetcode Squares-of-a-Sorted-Array]]
|
||||
- [[Leetcode Valid-Sudoku]]
|
||||
- [[Two pointers approach]]
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/merge-sorted-array/)
|
||||
- [multiset cpp reference](https://leetcode.com/problems/merge-sorted-array/)
|
||||
|
|
|
@ -14,12 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#DFS OR tag:#BFS
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/merge-two-binary-trees/)
|
||||
___
|
||||
|
|
|
@ -10,16 +10,6 @@
|
|||
##### Difficulty:
|
||||
#leetcode #coding_problem #difficulty-easy
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#two_pointers
|
||||
```
|
||||
|
||||
- [[Leetcode Intersection-of-Two-Arrays-II]]
|
||||
- [[Leetcode Merge-Sorted-Array]]
|
||||
- [[Leetcode Squares-of-a-Sorted-Array]]
|
||||
- [[Two pointers approach]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/merge-two-sorted-lists/)
|
||||
___
|
||||
|
|
|
@ -14,21 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#two_pointers
|
||||
```
|
||||
|
||||
- [[Leetcode Intersection-of-Two-Arrays-II]]
|
||||
- [[Leetcode Merge-Sorted-Array]]
|
||||
- [[Leetcode Merge-Two-Sorted-Lists]]
|
||||
- [[Leetcode Move-Zeroes]]
|
||||
- [[Leetcode Remove-Nth-Node-From-End-of-List]]
|
||||
- [[Leetcode Reverse-Words-In-a-String]]
|
||||
- [[Leetcode Squares-of-a-Sorted-Array]]
|
||||
- [[Leetcode Two-Sum-II-Input-Array-Is-Sorted]]
|
||||
- [[Two pointers approach]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/middle-of-the-linked-list/)
|
||||
___
|
||||
|
|
|
@ -14,18 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#array_in_place_operation OR tag:#two_pointers
|
||||
```
|
||||
|
||||
- [[Leetcode Intersection-of-Two-Arrays-II]]
|
||||
- [[Leetcode Merge-Sorted-Array]]
|
||||
- [[Leetcode Merge-Two-Sorted-Lists]]
|
||||
- [[Leetcode Rotate-Array]]
|
||||
- [[Leetcode Squares-of-a-Sorted-Array]]
|
||||
- [[Two pointers approach]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/move-zeroes/)
|
||||
___
|
||||
|
|
|
@ -12,12 +12,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#stack
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/next-greater-element-i/)
|
||||
___
|
||||
|
|
|
@ -14,11 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#bit_manipulation
|
||||
```
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/number-of-1-bits/)
|
||||
___
|
||||
|
|
|
@ -10,31 +10,6 @@
|
|||
##### Difficulty:
|
||||
#leetcode #coding_problem #difficulty-easy
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#recursion OR tag:#iteration OR tag:#array -tag:#Kadane_s_algorithm
|
||||
```
|
||||
|
||||
- [[Binary Search Algorithm]]
|
||||
- [[cpp_Range_based_for_loop]]
|
||||
- [[Leetcode Binary-Search]]
|
||||
- [[Leetcode First-Bad-Version]]
|
||||
- [[Leetcode First-Unique-Character-In-a-String]]
|
||||
- [[Leetcode Insert-Into-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Invert-Binary-Tree]]
|
||||
- [[Leetcode Path-Sum]]
|
||||
- [[Leetcode Ransom-Note]]
|
||||
- [[Leetcode Reshape-The-Matrix]]
|
||||
- [[Leetcode Reverse-Linked-List]]
|
||||
- [[Leetcode Rotate-Array]]
|
||||
- [[Leetcode Search-Insert-Position]]
|
||||
- [[Leetcode Squares-of-a-Sorted-Array]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
- [[Leetcode Two-Sum]]
|
||||
- [[Leetcode Valid-Anagram]]
|
||||
- [[Two pointers approach]]
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/pascals-triangle/)
|
||||
- [Additional resources]()
|
||||
|
|
|
@ -14,22 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#DFS
|
||||
```
|
||||
|
||||
- [[Leetcode Binary-Tree-Inorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Postorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Preorder-Traversal]]
|
||||
- [[Leetcode Insert-Into-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Invert-Binary-Tree]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Maximum-Depth-Of-Binary-Tree]]
|
||||
- [[Leetcode Search-In-a-Binary-Tree]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
- [[Leetcode Validate-Binary-Search-Tree]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/path-sum/)
|
||||
___
|
||||
|
|
|
@ -14,11 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#sliding_window
|
||||
```
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/permutation-in-string/)
|
||||
___
|
||||
|
|
|
@ -12,12 +12,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#backtrack
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/permutations/)
|
||||
___
|
||||
|
|
|
@ -14,12 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#BFS
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/populating-next-right-pointers-in-each-node/)
|
||||
___
|
||||
|
|
|
@ -14,12 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#bitset OR tag:#bit_manipulation
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/power-of-two/)
|
||||
___
|
||||
|
|
|
@ -10,16 +10,6 @@
|
|||
##### Difficulty:
|
||||
#leetcode #coding_problem #difficulty-easy
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#hash_table
|
||||
```
|
||||
|
||||
- [[cpp_std_unordered_map]]
|
||||
- [[Leetcode First-Unique-Character-In-a-String]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
- [[Leetcode Valid-Anagram]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/ransom-note/)
|
||||
___
|
||||
|
|
|
@ -13,18 +13,6 @@
|
|||
> 1st. revision: 2022-07-02
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#linked_list
|
||||
```
|
||||
|
||||
- [[Floyd's Cycle Finding Algorithm]]
|
||||
- [[Leetcode Linked-List-Cycle]]
|
||||
- [[Leetcode Merge-Two-Sorted-Lists]]
|
||||
- [[Leetcode Remove-Linked-List-Elements]]
|
||||
- [[Leetcode Reverse-Linked-List]]
|
||||
- [[Two pointers approach]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/remove-duplicates-from-sorted-list/)
|
||||
___
|
||||
|
|
|
@ -8,18 +8,6 @@
|
|||
##### Difficulty:
|
||||
#leetcode #coding_problem #difficulty-easy
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#linked_list
|
||||
```
|
||||
|
||||
- [[Floyd's Cycle Finding Algorithm]]
|
||||
- [[Leetcode Linked-List-Cycle]]
|
||||
- [[Leetcode Merge-Two-Sorted-Lists]]
|
||||
- [[Leetcode Remove-Duplicates-From-Sorted-List]]
|
||||
- [[Leetcode Reverse-Linked-List]]
|
||||
- [[Two pointers approach]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/remove-linked-list-elements/)
|
||||
- [Additional Solutions](https://leetcode.com/problems/remove-linked-list-elements/discuss/722528/C++-2-solutions:-With-single-pointer-+-With-double-pointers-(Easy-to-understand)/1390186)
|
||||
|
|
|
@ -14,21 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#two_pointers
|
||||
```
|
||||
|
||||
- [[Leetcode Intersection-of-Two-Arrays-II]]
|
||||
- [[Leetcode Merge-Sorted-Array]]
|
||||
- [[Leetcode Merge-Two-Sorted-Lists]]
|
||||
- [[Leetcode Middle-of-the-Linked-List]]
|
||||
- [[Leetcode Move-Zeroes]]
|
||||
- [[Leetcode Reverse-Words-In-a-String]]
|
||||
- [[Leetcode Squares-of-a-Sorted-Array]]
|
||||
- [[Leetcode Two-Sum-II-Input-Array-Is-Sorted]]
|
||||
- [[Two pointers approach]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/remove-nth-node-from-end-of-list/)
|
||||
- [Explanation](https://leetcode.com/problems/remove-nth-node-from-end-of-list/discuss/1164542/JS-Python-Java-C%2B%2B-or-Easy-Two-Pointer-Solution-w-Explanation)
|
||||
|
|
|
@ -8,29 +8,6 @@
|
|||
##### Difficulty:
|
||||
#leetcode #coding_problem #difficulty-easy
|
||||
##### Related topics:
|
||||
```expander
|
||||
(tag:#array OR tag:#vector) -tag:#Kadane_s_algorithm
|
||||
```
|
||||
|
||||
- [[Binary Search Algorithm]]
|
||||
- [[cpp_Range_based_for_loop]]
|
||||
- [[Leetcode Binary-Search]]
|
||||
- [[Leetcode First-Bad-Version]]
|
||||
- [[Leetcode First-Unique-Character-In-a-String]]
|
||||
- [[Leetcode Merge-Sorted-Array]]
|
||||
- [[Leetcode Pascal's-Triangle]]
|
||||
- [[Leetcode Ransom-Note]]
|
||||
- [[Leetcode Rotate-Array]]
|
||||
- [[Leetcode Search-a-2D-Matrix]]
|
||||
- [[Leetcode Search-Insert-Position]]
|
||||
- [[Leetcode Squares-of-a-Sorted-Array]]
|
||||
- [[Leetcode Two-Sum]]
|
||||
- [[Leetcode Valid-Anagram]]
|
||||
- [[Leetcode Valid-Sudoku]]
|
||||
- [[Two pointers approach]]
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/reshape-the-matrix/)
|
||||
___
|
||||
|
|
|
@ -14,12 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#bitset
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/reverse-bits/)
|
||||
- [Solution and detailed explanation](https://leetcode.com/problems/reverse-bits/discuss/1232842/JAVA-C%2B%2B-%3A-0ms-or-O(1)-Time-Complexity-or-in-place-or-Detailed-Explanation)
|
||||
|
|
|
@ -14,20 +14,6 @@
|
|||
##### Revisions:
|
||||
2022-07-02
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#linked_list
|
||||
```
|
||||
|
||||
- [[Floyd's Cycle Finding Algorithm]]
|
||||
- [[Leetcode Linked-List-Cycle]]
|
||||
- [[Leetcode Merge-Two-Sorted-Lists]]
|
||||
- [[Leetcode Remove-Duplicates-From-Sorted-List]]
|
||||
- [[Leetcode Remove-Linked-List-Elements]]
|
||||
- [[Two pointers approach]]
|
||||
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/reverse-linked-list/)
|
||||
___
|
||||
|
|
|
@ -14,18 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#recursion
|
||||
```
|
||||
|
||||
- [[Leetcode Insert-Into-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Invert-Binary-Tree]]
|
||||
- [[Leetcode Pascal's-Triangle]]
|
||||
- [[Leetcode Path-Sum]]
|
||||
- [[Leetcode Reverse-Linked-List]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/reverse-string/)
|
||||
___
|
||||
|
|
|
@ -14,12 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#two_pointers
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/reverse-words-in-a-string-iii/)
|
||||
___
|
||||
|
|
|
@ -14,12 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#array_in_place_operation OR #reverse_array
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/rotate-array/)
|
||||
___
|
||||
|
|
|
@ -14,12 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#<INSERT_TAG_HERE>
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/rotting-oranges/)
|
||||
___
|
||||
|
|
|
@ -14,25 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#DFS OR tag:#BFS
|
||||
```
|
||||
|
||||
- [[Breadth First Search]]
|
||||
- [[Leetcode Binary-Tree-Inorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Level-Order-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Postorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Preorder-Traversal]]
|
||||
- [[Leetcode Insert-Into-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Invert-Binary-Tree]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Maximum-Depth-Of-Binary-Tree]]
|
||||
- [[Leetcode Path-Sum]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
- [[Leetcode Validate-Binary-Search-Tree]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/search-in-a-binary-search-tree/submissions/)
|
||||
___
|
||||
|
|
|
@ -14,18 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#binary_search
|
||||
```
|
||||
|
||||
- [[Binary Search Algorithm]]
|
||||
- [[Leetcode Binary-Search]]
|
||||
- [[Leetcode First-Bad-Version]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Search-a-2D-Matrix]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/binary-search/)
|
||||
___
|
||||
|
|
|
@ -10,22 +10,6 @@
|
|||
##### Difficulty:
|
||||
#leetcode #coding_problem #difficulty-easy
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#vector OR tag:#vector_2d OR tag:#binary_search
|
||||
```
|
||||
|
||||
- [[Binary Search Algorithm]]
|
||||
- [[cpp_Range_based_for_loop]]
|
||||
- [[Leetcode Binary-Search]]
|
||||
- [[Leetcode First-Bad-Version]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Merge-Sorted-Array]]
|
||||
- [[Leetcode Reshape-The-Matrix]]
|
||||
- [[Leetcode Search-Insert-Position]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
- [[Leetcode Valid-Sudoku]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/search-a-2d-matrix/submissions/)
|
||||
___
|
||||
|
|
|
@ -14,12 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#bit_manipulation
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/single-number/)
|
||||
- [Learn about XOR](https://en.wikipedia.org/wiki/Exclusive_or#Computer_science)
|
||||
|
|
|
@ -14,16 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#two_pointers
|
||||
```
|
||||
|
||||
- [[Leetcode Intersection-of-Two-Arrays-II]]
|
||||
- [[Leetcode Merge-Sorted-Array]]
|
||||
- [[Leetcode Merge-Two-Sorted-Lists]]
|
||||
- [[Two pointers approach]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/squares-of-a-sorted-array/)
|
||||
___
|
||||
|
|
|
@ -14,12 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#backtrack
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/subsets/)
|
||||
___
|
||||
|
|
|
@ -14,25 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#DFS OR tag:#BFS
|
||||
```
|
||||
|
||||
- [[Breadth First Search]]
|
||||
- [[Leetcode Binary-Tree-Inorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Level-Order-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Postorder-Traversal]]
|
||||
- [[Leetcode Binary-Tree-Preorder-Traversal]]
|
||||
- [[Leetcode Insert-Into-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Invert-Binary-Tree]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Maximum-Depth-Of-Binary-Tree]]
|
||||
- [[Leetcode Path-Sum]]
|
||||
- [[Leetcode Search-In-a-Binary-Tree]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
- [[Leetcode Validate-Binary-Search-Tree]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/symmetric-tree/)
|
||||
___
|
||||
|
|
|
@ -12,11 +12,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#dynamic_programming
|
||||
```
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/triangle/)
|
||||
___
|
||||
|
|
|
@ -14,18 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#two_pointers
|
||||
```
|
||||
|
||||
- [[Leetcode Intersection-of-Two-Arrays-II]]
|
||||
- [[Leetcode Merge-Sorted-Array]]
|
||||
- [[Leetcode Merge-Two-Sorted-Lists]]
|
||||
- [[Leetcode Move-Zeroes]]
|
||||
- [[Leetcode Squares-of-a-Sorted-Array]]
|
||||
- [[Two pointers approach]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/)
|
||||
___
|
||||
|
|
|
@ -14,23 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#BFS OR tag:#binary_search
|
||||
```
|
||||
|
||||
- [[Binary Search Algorithm]]
|
||||
- [[Breadth First Search]]
|
||||
- [[Leetcode Binary-Search]]
|
||||
- [[Leetcode Binary-Tree-Level-Order-Traversal]]
|
||||
- [[Leetcode First-Bad-Version]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Maximum-Depth-Of-Binary-Tree]]
|
||||
- [[Leetcode Search-a-2D-Matrix]]
|
||||
- [[Leetcode Search-In-a-Binary-Tree]]
|
||||
- [[Leetcode Search-Insert-Position]]
|
||||
- [[Leetcode Symmetric-Tree]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/two-sum-iv-input-is-a-bst/)
|
||||
- [Three method to solve this](https://leetcode.com/problems/two-sum-iv-input-is-a-bst/discuss/106059/JavaC%2B%2B-Three-simple-methods-choose-one-you-like)
|
||||
|
|
|
@ -10,14 +10,6 @@
|
|||
##### Difficulty:
|
||||
#coding_problem #leetcode #difficulty-easy
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#map OR tag:#unordered_map
|
||||
```
|
||||
|
||||
- [[cpp_std_unordered_map]]
|
||||
- [[Leetcode Intersection-of-Two-Arrays-II]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/two-sum)
|
||||
- [O(n) Solution](https://leetcode.com/problems/two-sum/discuss/13/Accepted-C++-O(n)-Solution/263)
|
||||
|
|
|
@ -10,14 +10,6 @@
|
|||
##### Difficulty:
|
||||
#leetcode #coding_problem #difficulty-easy
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#array tag:#hash_table
|
||||
```
|
||||
|
||||
- [[Leetcode First-Unique-Character-In-a-String]]
|
||||
- [[Leetcode Ransom-Note]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/valid-anagram/)
|
||||
___
|
||||
|
|
|
@ -12,13 +12,6 @@
|
|||
> 1st revision: 2022-07-03 optimize code
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#stack
|
||||
```
|
||||
|
||||
- [[Leetcode Implement-Queue-Using-Stacks]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/valid-parentheses/)
|
||||
___
|
||||
|
|
|
@ -8,17 +8,6 @@
|
|||
##### Difficulty:
|
||||
#leetcode #coding_problem #difficulty-easy
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#vector
|
||||
```
|
||||
|
||||
- [[Binary Search Algorithm]]
|
||||
- [[cpp_Range_based_for_loop]]
|
||||
- [[Leetcode Merge-Sorted-Array]]
|
||||
- [[Leetcode Reshape-The-Matrix]]
|
||||
- [[Leetcode Search-a-2D-Matrix]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/valid-sudoku/)
|
||||
- [Simple solution](https://leetcode.com/problems/valid-sudoku/discuss/15464/My-short-solution-by-C%2B%2B.-O(n2))
|
||||
|
|
|
@ -14,15 +14,6 @@
|
|||
> N/A
|
||||
|
||||
##### Related topics:
|
||||
```expander
|
||||
tag:#DFS_inorder OR tag:#binary_search_tree
|
||||
```
|
||||
|
||||
- [[Leetcode Binary-Tree-Inorder-Traversal]]
|
||||
- [[Leetcode Lowest-Common-Ancestor-Of-a-Binary-Search-Tree]]
|
||||
- [[Leetcode Two-Sum-IV-Input-Is-a-BST]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Link to problem](https://leetcode.com/problems/validate-binary-search-tree/)
|
||||
___
|
||||
|
|
|
@ -10,16 +10,6 @@ ___
|
|||
##### Difficulty:
|
||||
#CS_analysis #difficulty-
|
||||
##### Related problems:
|
||||
```expander
|
||||
tag:#coding_problem tag:#two_pointers -tag:#template_remove_me
|
||||
```
|
||||
|
||||
- [[Leetcode Intersection-of-Two-Arrays-II]]
|
||||
- [[Leetcode Merge-Sorted-Array]]
|
||||
- [[Leetcode Merge-Two-Sorted-Lists]]
|
||||
- [[Leetcode Squares-of-a-Sorted-Array]]
|
||||
|
||||
|
||||
##### Links:
|
||||
- [leetcode](https://leetcode.com/explore/learn/card/fun-with-arrays/511/in-place-operations/)
|
||||
___
|
||||
|
|
|
@ -8,13 +8,6 @@ ___
|
|||
##### Difficulty:
|
||||
#CS_analysis #difficulty-easy
|
||||
##### Related problems:
|
||||
```expander
|
||||
tag:#coding_problem tag:#array tag:#vector tag:#multiset -tag:#template_remove_me
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [cppreference](https://en.cppreference.com/w/cpp/language/range-for)
|
||||
___
|
||||
|
|
|
@ -8,14 +8,6 @@ ___
|
|||
##### Difficulty:
|
||||
#CS_analysis #difficulty-easy
|
||||
##### Related problems:
|
||||
```expander
|
||||
tag:#coding_problem tag:#multiset -tag:#template_remove_me
|
||||
```
|
||||
|
||||
- [[Leetcode Merge-Sorted-Array]]
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [cppreference](https://en.cppreference.com/w/cpp/container/multiset)
|
||||
___
|
||||
|
|
|
@ -8,14 +8,6 @@ ___
|
|||
##### Difficulty:
|
||||
#CS_analysis #difficulty-easy
|
||||
##### Related problems:
|
||||
```expander
|
||||
tag:#coding_problem tag:#sort -tag:#template_remove_me
|
||||
```
|
||||
|
||||
- [[Leetcode Intersection-of-Two-Arrays-II]]
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [cpp reference](https://en.cppreference.com/w/cpp/algorithm/sort)
|
||||
___
|
||||
|
|
|
@ -8,15 +8,6 @@ ___
|
|||
##### Difficulty:
|
||||
#CS_analysis #difficulty-easy
|
||||
##### Related problems:
|
||||
```expander
|
||||
tag:#coding_problem tag:#unordered_map -tag:#template_remove_me
|
||||
```
|
||||
|
||||
- [[Leetcode Intersection-of-Two-Arrays-II]]
|
||||
- [[Leetcode Two-Sum]]
|
||||
|
||||
|
||||
|
||||
##### Links:
|
||||
- [Unordered map explainer](https://www.geeksforgeeks.org/unordered_map-in-cpp-stl/)
|
||||
- [Unordered map vs ordered map](https://www.geeksforgeeks.org/unordered_map-in-cpp-stl/)
|
||||
|
|
Loading…
Reference in a new issue