Greedy : Minimize the Heights | Adobe | Microsoft

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

Hi All!
Came up with an idea last week that making Youtube videos will be a good way to keep myself motivated towards coding and other stuffs. Hence, I started learning , coding and uploading videos at the same time. Enjoying the process and would need your help too.
Please do visit my channel and do the needful.
#Subscribe.
I will make videos on problem from all topics encountered in the way!
#DataStructures #Algorithms #Interview Preparation # Competitive Coding
Рекомендации по теме
Комментарии
Автор

So many videos on this question but this one is the simplest and with great explanation (shortest code length too). Thank you so much for this ! Really helpful.

jhanvimimani
Автор

If we got negative values while subtracting b with k, then it's a problem bcz the current minimum will get updated and the result will get affected bcz the algorithm is not handling the negative values

mdazad
Автор

thanks a lot sir..np the video was lenghty but was able to understand this problem...i was trying to understand it since 2 days but understood it now thank you!!

udaysanghani
Автор

If in the starting pair, y-k gives zero then we will not update x . But in question every element need to get updated once. This condition will not be satisfied. Please correct me if I am wrong sir.

sriharshasamayamanthula
Автор

thankyou brother for the detailed explanation :)))

rekildo
Автор

I've to admit that you're trying ur best to explain this problem and you're doing great 👏 keep it up. You've done great job.
*It's just a suggestion*
it'll be moreover easy if you just explain it in hindi and video length is also going to decrease..

ryzenae
Автор

Wow after so many struggle got this one. Thank u so much🥰

IamDemotivated
Автор

Thank god i found this vid, i finally understand this problem a little bit .

OtakRajCodes
Автор

Bhai avi tk ka sbse best explaination tha es problem ka

bipinsingh
Автор

Thanku so much, was trying to learn since yesterday, now it's clear how to do exactly

_DipaliSalunke
Автор

Literally wandering many sites and videos for this intuition, but no one make me clear as this explanation to me! Great explanation sir. Very Big Thankyou Sir😃🙏

.sahilsaxena
Автор

So much beneficial for all students and faculties of cse/IT and Ece

shwetabanerjee
Автор

thank you so much sir for awsome explanation :)

Core_Programming
Автор

why do i get wrong output if i take "int diff =Integer.MAX_VALUE; " instead of "diff = b-a" for
k= 5
n=10
[5 5 8 6 4 10 3 8 9 10]

OtakRajCodes