Frog 2 | Problem B | Atcoder DP смотреть онлайн
In this series of videos I am trying to explain my approach to these dynamic programming based problems. I will try to solve the all the problems i.e from A - Z.
I think by following my videos the beginners can get an idea on how to build the recursive solution and then try to memoize them.
There are debates like recursive is slower, and I do agree that recursion is slower, it tasks twice as much time as iterative approach would take. But getting the intuition for the recursive approach is quite easy. And hey you can always convert your recursive approach to iterative with some thinking as you already have the recurrence relation.
And to be honest I have never seen (or may be once or twice only) that my recursive approach is timing out with memoization in place for any problem. May be it also depends on what programming language we are using ( I use. C++ ), for example I have known that recursion does quite play well in Java.
So having said all of that,
I encourage you to do following
1. try to think of recurrence relation by considering all the possibilities
2. then build a recursive solution,
3. validate your approach by checking the sample cases.
4. consider the params in your recurrence relation which are state builder,
5. not all the params that you pass in are the state changer,
6. build a dp table, initialize it with some value which cant' be the answer for the problem, (I use -1 mostly but it depends).
7. then do the memoization.
I hope I was able to help,
Thanks for watching this videos,
Also do subscribe to my channel and check out my other playlists to learn more on data structures and algorithms.
Channel link = https://www.youtube.com/channel/UC6uQdd7kLLOdlHSVklhV7Cw
Please leave any comments / suggestion / feedback that you have for me in the comment sections below.
Problem link == https://atcoder.jp/contests/dp/tasks/dp_b
Solution link == https://ideone.com/bCR0HU
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Frog 2 | Problem B | Atcoder DP» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.