3229. Minimum Operations to Make Array Equal to Target | Greedy | With Proof

  Рет қаралды 5,385

Aryan Mittal

Aryan Mittal

Күн бұрын

Пікірлер: 20
@_sf_editz1870
@_sf_editz1870 6 ай бұрын
The Approach is very good and intutive aryan
@InWonderland-z2l
@InWonderland-z2l 6 ай бұрын
was so elated to see that you've put out a video for today's contest :) by the way, will you be doing the second problem (vowels game in a string) for this contest as well? i had doubts in it and the way you tackle every little edge case and condition is amazing
@monilcharola6873
@monilcharola6873 6 ай бұрын
Bro it;s greedy. See, Alice will go first. Consider that in a game each player, plays for itself and in the optimal case they will try to make their opponents loose. Case 1 : There are no vowels. (:( Alice cannot take anything thus Alice is defeated) Case 2 : There are either odd or even number of vowels -> If odd (Since Alice wants to defeat Bob, she takes the substring containing all the vowels thus leaving 0 vowels for BOB ) Alice wins -> If even (ALICE want's to win by defeating BOB, here also she takes substring containing odd number of vowels, leaving only 1 vowel for BOB) thus Bob won't have even vowels to pick, here also Alice wins!! CODE : I vowel count == 0, BOB wins Else ALICE winds PS : Alice is a bitch!!!!!!!!😂
@uncutengineer2797
@uncutengineer2797 6 ай бұрын
your explaination is really really good aryan bro
@abhinavnarula7300
@abhinavnarula7300 6 ай бұрын
At 1:47 won't we require 3 ops instead of 2? I am confused on that part. Can someone pls clarify
@monilcharola6873
@monilcharola6873 6 ай бұрын
JUST BRILLIANT !!!!!!!!!!!!!!!!!!!!!!
@PhenomenalInitiations
@PhenomenalInitiations 2 ай бұрын
wowwww
@sanchitdeepsingh9663
@sanchitdeepsingh9663 6 ай бұрын
thanks
@23cash86
@23cash86 6 ай бұрын
I had figured everything till 19:00 , I was blank aftermath
@TechieClasher
@TechieClasher 6 ай бұрын
ha ha, was waiting for this itself
@asthajain2511
@asthajain2511 6 ай бұрын
aryan bhai op🫡
@nooob_coder
@nooob_coder 6 ай бұрын
wow i can think like this ?
@ITACH1688
@ITACH1688 6 ай бұрын
kya hi chumma explanation hai 😳
@sangdilbiswal30
@sangdilbiswal30 6 ай бұрын
I almost figured it out but time was done😅
@hrudaytej2133
@hrudaytej2133 6 ай бұрын
how tf am i supposed to come up with this in contest?
@nikhilsoni2403
@nikhilsoni2403 6 ай бұрын
Bhai saturday ke contest ka 4th problem ka solution upload karo na 😂😂
@prajitbanerjee8226
@prajitbanerjee8226 6 ай бұрын
LOL bro
@satwiktatikonda764
@satwiktatikonda764 6 ай бұрын
why is it that difficult?
@monilcharola6873
@monilcharola6873 6 ай бұрын
@@satwiktatikonda764 Bro only 69 people were able to solve it
Jaidarman TOP / Жоғары лига-2023 / Жекпе-жек 1-ТУР / 1-топ
1:30:54
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 211 М.
one year of studying (it was a mistake)
12:51
Jeffrey Codes
Рет қаралды 292 М.
DARKER SIDE of SOFTWARE ENGINEERING !!
12:09
Striver
Рет қаралды 147 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 854 М.
10 Math Concepts for Programmers
9:32
Fireship
Рет қаралды 2 МЛН
What P vs NP is actually about
17:58
Polylog
Рет қаралды 148 М.
The Mathematician So Strange the FBI Thought He Was a Spy
13:11
The Absolute Best Intro to Monads For Software Engineers
15:12
Studying With Alex
Рет қаралды 682 М.