Optimal Strategy for a Game Dynamic Programming

preview_player
Показать описание

NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. In this video, we discuss the problem optimal strategy for a game using dynamic programming. In this problem,

1. You are given an array(arr) of length N, where N is an even number.
2. The elements of the array represent N coins of values arr1,arr1...arrN.
3. You are playing a game against an opponent in an alternative way, where the opponent is equally smart.
4. In this game, a player selects either the first or the last coin from the row in every turn, removes it from the row permanently, and receives the value of the coin.
5. You have to find the maximum possible amount of money you can win if you make the first move.

#dynamicprogramming #algorithms #datastructure

Рекомендации по теме
Комментарии
Автор

That one line"When you do things DO YOUR BEST and when things happen to you assume the worst case" sums up the whole question. Thank you for this !

garvitrajput
Автор

This is a crime against other Youtube Channel.
Simply the best.

tusharjajodia
Автор

This man teaches things on next level, keep making the superb content sir..

sakshamsolanki
Автор

This video teaches a life lesson: "When you do something, do your best. But when things happen to you, prepare for the worst", BTW amazing content sir

meme_engineering
Автор

I saw this video few weeks back to understand a solution, i came back here to mention how useful this video was in applying logic to other similar questions....great video sir!

cash
Автор

You teach so well that at 7:50, I got concept of the entire video and didn't had to watch the entire video. You are great

sujoyseal
Автор

One of the best explanations on Optimal game strategy, feels very much enlingtned after watching this

rajkishorpradhan
Автор

I've just started to understand how works dynamic programmation thanks to you

Angel-
Автор

The way you explain is just outstanding. Couldnt understand this by reading leetcode solutions

akshaykapadia
Автор

ek number sir, seriously. Main kisi bhi sawal me stuck ho jata hu toh sbse pehle youtube pr aapki videos search krta hu. Next level explanations hoti hai aapki.

akshaysolanki
Автор

if i will join the pepcoding in the future, reason will be sumeet sir, he is amazing teacher i have ever met.

yuvrajsinghcme
Автор

This question came in the online coding round of Loginext solutions!Thanks for the video.

alpishjain
Автор

Sir you are god of programming!!
Simply best and you concentrate on building the fundamentals instead of just reading out the code....
Thanku so much sir!

harshitavyas
Автор

Sir ek to aapki teaching itni lajawaab and usko jb dark mode pe implement krre to maza hi aajata h.
You are best.

divyamgupta
Автор

POTD tha ajka Meine min aur max ka condition k bare mein nhi socha tha sirf max lekar forward ja raha tha. Great video samjh agya pura

samirhembrom
Автор

Scratched my head for almost 2 3 hours for knowing why we are doing in min operation rather than max operation
And when I saw the video, I got the reason in just 2 to 3 min, you have explained this thing in such a fantastic way
Thanks, you style of teaching is phenomenal
🙏🙏🙏🙏🙏🙏

aniketverma
Автор

Excellent explanation sir... I was so confused in this question before this explanation.

abhayroadlines
Автор

sir your videos have been helping me since 1 month. THNX so much

devanshsharma
Автор

u explained the entire question in one philosophical

harshwardhanchaube
Автор

u teaching is just awesome. I m able to understand everything

SatyaPrakash-djix