- Practice problems.
- https://leetcode.com/problems/minimum-path-sum. Did BFS first. Works, but not as fast. Wrote a secondary recursive solution, with both backtracking and DP. Faster.
- https://leetcode.com/problems/4sum. Wrote a beautiful generic solution to the ksum problem. Recurse down to the 1sum case, not the 2sum! The exit condition is just the target being in the remaining nums!
- https://leetcode.com/problems/3sum-closest. Similar.
- https://leetcode.com/problems/next-permutation/. Dumb question. Too specific for an interview, and doesn’t show much problemsolving skill.
- https://leetcode.com/problems/swap-nodes-in-pairs/. Recursive linked list swapping. Just define to a temp variable, perform the swap, the recurse to the next one. Could totally be solved iteratively.
- https://leetcode.com/problems/reverse-nodes-in-k-group/. Same thing, but instead of k=2 (swap every pair), swap every k. If you’re swapping 2 nodes, each node needs 2 connections for each neighbor, so 4 connections total. Since the root head has no left, you’re doing 3 connections on each iteration/recursion.
- https://leetcode.com/problems/sudoku-solver/. A literal solver for a given sudoku board. Just recurses, populating the board with a new (valid) number and passing it through, then exiting in the base case where there are no valid plays. Backtracking. Not DP. Takes about 40 lines.
- Remember {} is the set literal in python.
- Jack borrowed the BMW for a 7am ride with Teej.
- Run, pull, sauna, meditate, stretch.
- Watched the truth about emanuel, the 2013 movie which servant allegedly ripped off. It was decent until the ending. The similarity is the fake baby, but not much else. Overall I think Servant is distinct enough to survive.
- UFC 246, mcgregor cerrone.
- Got kabuli naan, my favorite.
- Dimensional is the company that Rob partners with for data / portfolio suggestions (regarding my folks’ retirement).