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. Austin Reaves 41.2K posts
- 2. Steelers 84.1K posts
- 3. Packers 65.6K posts
- 4. Tomlin 12.2K posts
- 5. Tucker Kraft 15.3K posts
- 6. Jordan Love 16.3K posts
- 7. #GoPackGo 10.6K posts
- 8. Derry 19.1K posts
- 9. #LakeShow 3,669 posts
- 10. #BaddiesAfricaReunion 8,803 posts
- 11. Pretty P 3,774 posts
- 12. #LaGranjaVIP 68.6K posts
- 13. Aaron Rodgers 19.7K posts
- 14. Zayne 19.1K posts
- 15. Teryl Austin 2,140 posts
- 16. Dolly 12.3K posts
- 17. #RHOP 9,432 posts
- 18. Sabonis 2,418 posts
- 19. Karola 4,146 posts
- 20. Green Bay 10.9K posts
Something went wrong.
Something went wrong.