Do anyone know how can i learn how to use dp algorithm? like, i cant use anything that i read from books and i need to learn it.
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | djm03178 | 152 |
Название |
---|
Start with the fundamental problems. CSES Problem Set is a great resource. Spend some time on each problem you solve on your own or by seeing the solution. Understand the intuition of how the states are linked to each other, how the base cases, and finally the final subproblem is formulated. Understand the Transitions very thoroughly and analyze why such Transitions. After you do 50-60% of the Problem set you are good to go. Now only practicing good problems would take you further.
Learn Recursion (You are given : [1,2,3,4,5,6]. Now you are able to write a code that will generate all possible combinations for ex. [2,3,4,1,5,6], [3,2,5,6,1,4]... total of 6! combinations using recursion and you understand how the code works).
Learn backtracking (Solve 8-queens problem and understand how the recursion works)
Read these 2 tutorials : Tutorial-1 Tutorial-2
You need to do some meditation first to develop enough concentration. With love.
hard luck bozo
The Atcoder educational dp contest might also help.
The one thing that helped me immensely in understanding DP are Errichto youtube videos on dynamic programming where he goes over some basic and very common DP problems. Good luck!
The answers mostly discuss practice, and are quite comprehensive in their coverage of resources. I would like to add though, one might need to go over blogs/videos multiple times in order to understand the same. Don't be disheartened by that. Also, you can refer to this blog for the basic idea of DP.
https://www.youtube.com/playlist?list=PLgUwDviBIf0qUlt5H_kiKYaNSqJ81PMMY
you can see this, it helped me a lot .
i personally wouldn't advise learning dp at rating 588. I recommend practicing problems at the moment and then you should start of with some algorithms such as binary search
Start with problem in atcoder dp contest, in this contest appear all basic techniques. Good luck for problem solving!
Bruh
buddy dp is a optimization technique. not the idea to solve a question. the main idea requried to solve the question is always something else, you just use dp to optimize it :) change pov