Блог пользователя Aylup

Автор Aylup, история, 6 часов назад, По-английски

Coming from leetcode, I would just pattern match and guess and check solutions and my skill level was all over the place. Sometimes I could solve a 2k+ rated problem. Other times, I would struggle with a 1300. I couldn't pinpoint why I was so inconsistent and how to get better.

But Zhtluo's blog on Russian-ness literally changed my entire view of problem solving. I started working on building solutions from the problem statement and letting the technique reveal itself to me, instead of guessing and checking. Emphasizing observation shot my rating up from pupil to expert.

I started a youtube channel to emphasize and demonstrate this in a fun, engaging way.

Dynamic programming really feels like a "hate it or love it" subject and I think it's because of 2 things.

  1. DP isn't really defined well. Most people who used to hate it just didn't have a clear, precise, or accurate definition.
  2. Writing a DP solution is as hard as proving a DP solution. Guessing greedy can be orders harder than proving it, but I feel that the inverse is true for DP.

I try to address both by emphasizing what DP is really about: writing and analyzing recurrence relations.

For many without a strong math background, this can seem intimidating, but I try my best to show that many times it can be as simple as defining keywords in a problem statement and simulating one level down.

This is my first video, I tried to make it entertaining and engaging, while still emphasizing strong formalization. I also have my own fun little definition that I believe is still correct and better captures the approach to DP problems than "Finding optimal substructures with overlapping subproblems" (feel free to correct me if I'm wrong).

I'd love to hear your thoughts and any constructive criticism is welcomed (both content and presentation).

Thank you!

Here's the video

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

»
71 минуту назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

The friend of mine recomended me MIT dp lectures. They are very good. In few words:

  1. Understand that this is really dp problem.
  2. What problem is asking?
  3. What are the states?
  4. What are the transitions? Where you want them to do?
  5. What is the overall time complexity?