Ruby Plus
@ruby_plus
The official http://rubyplus.com Twitter account.
คุณอาจชื่นชอบ
damage and cancer is very bad for the brand. This is like the cheap motels! Front desk has no clue how to deal with the situation. Horrible customer service!
DP tip: Take the recursive code and modify it such that recursive calls are replaced by dp table lookups.
To decide on the dp table dimensions, ask yourself: What are the changing parameters to the method? These parameters need to be the keys in the lookup table.
The DFS traversal of a graph creates a tree during execution. Good way to visualize the execution and reason about the code.
Recursion by nature goes deep, DFS now makes more sense. The reason depth first traversal is named depth first search is we are searching for a solution. It's not about searching for an element. Few months ago was confused by the term DFS.
One of key design decisions to solve tree problems is to know whether the problem requires top down or bottom up approach. Does the data flow from the child to parents or does it need to flow from parent to child? Counting the number of Univalue trees is an example for bottom up.
Simulating recursion programmatically uses stack that is allocated in the heap. This has much more space available than the stack used by recursion. Stack used by recursion is much smaller than programatic stack.
Dutch National Flag problem can be solved using two pointers, it needs two scans through the array whereas three pointers can partition the array in one scan. Positioning of pointers can be either scanning from left to right or pointers that start from the extremes of the array.
Check out the book cover for my upcoming book. What do you think? #99designed 99d.me/c/mtnu
How to Solve Coding Problems - A Developer's Guide to Acquiring Problem Solving Skills
Today is the 198th day of practicing coding problems on a daily basis. I am beginning to see the relationships between problems and instead of staring at the problem without any clue, beginning to see how to quickly come up with an approach to solve the problem.
We now over 160 #leetcode live coding session recordings. To get free access join Leetcode Live Coding Telegram group: t.me/joinchat/VOy5L…
UnBounded knapsack leetcode.com/problems/combi… Bounded Knapsack leetcode.com/problems/combi… leetcode.com/problems/subse… leetcode.com/problems/subse…
We are live coding the problem Unique Paths III (hard problem)
United States เทรนด์
- 1. Steelers 51.1K posts
- 2. Rodgers 20.9K posts
- 3. Chargers 35.3K posts
- 4. Tomlin 8,046 posts
- 5. Schumer 214K posts
- 6. #BoltUp 2,863 posts
- 7. Resign 101K posts
- 8. Keenan Allen 4,632 posts
- 9. #HereWeGo 5,598 posts
- 10. #TalusLabs N/A
- 11. Tim Kaine 17.1K posts
- 12. #RHOP 6,741 posts
- 13. Herbert 11.4K posts
- 14. Durbin 24.4K posts
- 15. Gavin Brindley N/A
- 16. #ITWelcomeToDerry 4,231 posts
- 17. Angus King 14.5K posts
- 18. Ladd 4,322 posts
- 19. 8 Democrats 8,298 posts
- 20. Jaylen Warren 1,892 posts
Something went wrong.
Something went wrong.