721. Accounts Merge
https://leetcode.com/problems/accounts-merge/
Pattern: connected graph
Pattern: connected graph
ML Use case
- Project metrics: https://psvishnu.substack.com/p/summary-critical-project-metrics
- Collected new use cases
- Started working on a new use case
- Collected new use cases
- Started working on a new use case
797. All Paths From Source to Target
Pattern: Graph DFS/BFS
Complexity: T:O(2^N), S:O(N)
Complexity: T:O(2^N), S:O(N)
weekly content 269
- Find Target Indices After Sorting Array. Pattern: sorting
- K Radius Subarray Averages. Pattern: Sliding Window
- Removing Minimum and Maximum from Array, Pattern: ???
- Find All people with Secret, Pattern: Graph
- K Radius Subarray Averages. Pattern: Sliding Window
- Removing Minimum and Maximum from Array, Pattern: ???
- Find All people with Secret, Pattern: Graph
66th Leetcode bi-weekly challenge
1. Count Common Words With One Occurrence
2. Minimum Number of Buckets Required to Collect Rainwater from Houses
3. Minimum Cost Homecoming of a Robot in a Grid
4. Count Fertile Pyramids in a Land
2. Minimum Number of Buckets Required to Collect Rainwater from Houses
3. Minimum Cost Homecoming of a Robot in a Grid
4. Count Fertile Pyramids in a Land
238. Product of Array Except Self
Optimized solution: T:O(n) S:O(1)
Pattern: Prefix and Suffix sum
Pattern: Prefix and Suffix sum
35. Search Insert Position
Pattern: binary search
Time: O(logn)
Space: O(1)
Time: O(logn)
Space: O(1)
986. Interval List Intersections
https://leetcode.com/problems/interval-list-intersections/
Important point: Know what are intersecting points and the formula to find intersection is max(x1,x2) and min(y1,y2)
Important point: Know what are intersecting points and the formula to find intersection is max(x1,x2) and min(y1,y2)
450. Delete Node in a BST
Consider cases
1. No Child elements then delete the node
2. If one child element replace the current node with a child
3. If two children then either pick the largest in left subtree or smallest in right sub tree.
1. No Child elements then delete the node
2. If one child element replace the current node with a child
3. If two children then either pick the largest in left subtree or smallest in right sub tree.
106. Construct Binary Tree from Inorder and Postorder Traversal
https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/
540. Single Element in a Sorted Array
learn 461. Hamming Distance
https://leetcode.com/problems/hamming-distance/
learn 448. Find All Numbers Disappeared in an Array
https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/
learn - 62. Unique Paths
https://leetcode.com/problems/unique-paths
learn: Kth Smallest Number in Multiplication Table
https://leetcode.com/problems/kth-smallest-number-in-multiplication-table/
368. Largest Divisible Subset
https://leetcode.com/problems/largest-divisible-subset/
1286. Iterator for Combination
1413. Minimum Value to Get Positive Step by Step Sum
https://leetcode.com/problems/minimum-value-to-get-positive-step-by-step-sum/
1178. Number of Valid Words for Each Puzzle
https://leetcode.com/problems/number-of-valid-words-for-each-puzzle/
- Bit masking
- Trie data structure
- Bit masking
- Trie data structure
96. Unique binary search tree
https://leetcode.com/problems/unique-binary-search-trees/
https://www.youtube.com/watch?v=Ox0TenN3Zpg
https://www.youtube.com/watch?v=Ox0TenN3Zpg
43. Multiply Strings
https://leetcode.com/problems/multiply-strings/
441. Arranging Coins
https://leetcode.com/problems/arranging-coins
Candidate interview
1. List to tree then sum of only left nodes.
2. Sentiment analysis of hotel reviews.
3. Image Classifier question
2. Sentiment analysis of hotel reviews.
3. Image Classifier question
129. Sum root to leaf node
https://leetcode.com/problems/sum-root-to-leaf-numbers/
980. Unique Paths III
Visualization: https://pythontutor.com/visualize.html#mode=edit
Explanation: https://www.youtube.com/watch?v=gsnTEtiN8T8
Explanation: https://www.youtube.com/watch?v=gsnTEtiN8T8