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 | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | Dominater069 | 154 |
8 | awoo | 154 |
10 | luogu_official | 150 |
Название |
---|
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