In this video of the dynamic programming tutorial by Joey, you will learn to solve the Snake sequence problem. It is also an addition to the set of matrix problems that you can bring under your belt
with this video.
Problem statement
-----------------
You're give a matrix of integers. All you need to do is find out the longest snake sequence from this matrix.
But you will what is a snake sequence?
A snake sequence is a sequence of integers in which every integer may have an integer with an addition or difference of 1 either on the right or on the cell below it.
For example here's a matrix for you
9 5 3 1
8 7 6 7
1 2 4 6
2 4 5 5
You can see that the snake sequence from this matrix of integers is { 9 , 8, 7 , 6, 7, 6, 5}
In this series of integers you can observe that every integer is either +1 or -1 of the integer on its left. You can also say that the adjacent integers are at the absolute
difference of 1.
We will formulate the dynamic programming algorithm in order to provide the solution to this problem which you can also say a variant of longest increasing subsequence.
-------------------------------------------------------
Also watch
-------------------------------------------------------
Weighted job scheduling problem
• Step by step guide to solve weighted job s...
Longest common subsequence dynamic programming
• Longest Common Subsequence Dynamic Program...
How to magically find longest common substring
• Longest common substring using Dynamic Pro...
Find ugly numbers using dynamic programming
• Step by step guide to find ugly numbers at...
Step by step guide to solve the staircase problem
• Step by Step guide to solve the staircase ...
На этой странице сайта вы можете посмотреть видео онлайн Snake sequence problem : solve matrix problems using dynamic programming длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Joey'sTech 28 Октябрь 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 1,503 раз и оно понравилось 30 зрителям. Приятного просмотра!