ML Interview questions

Common MLE Interview question from • SQL • DS & Algo • Product / Analytical questions • ML algos • ML system design • Statistics

721. Accounts Merge

https://leetcode.com/problems/accounts-merge/
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

797. All Paths From Source to Target

Pattern: Graph DFS/BFS
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
Carl Poppa 🛸

wow dude, working hard on a Sunday!

0 Likes
Carl Poppa 🛸

Lol never heard it, but it's a good one! all the best for the interviews!

0 Likes

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

238. Product of Array Except Self

Optimized solution: T:O(n) S:O(1)
Pattern: Prefix and Suffix sum

35. Search Insert Position

Pattern: binary search
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)

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.

106. Construct Binary Tree from Inorder and Postorder Traversal

https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/

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: 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/

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

96. Unique binary search tree

https://leetcode.com/problems/unique-binary-search-trees/
https://www.youtube.com/watch?v=Ox0TenN3Zpg

Candidate interview

1. List to tree then sum of only left nodes.
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