Non-Decreasing Array - Leetcode 665 - Python

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


0:00 - Read the problem
1:40 - Drawing Explanation
6:50 - Coding Explanation

leetcode 665

# #python
Disclosure: Some of the links above may be affiliate links, from which I may earn a small commission.
Рекомендации по теме
Комментарии
Автор

Leetcode + Neetcode = Success !
I got selected in Amazon thanks to you 😊

mrditkovich
Автор

Your channel is the best channel in my subscription list. Usually i get bored listening to the solution videos, but surprisingly that doesn't happen during your videos. Keep posting videos for the people like me so that i can also end up in the place you are currently in🙌🙌

shashanksingh
Автор

Please never stop making these. I really like them.

fazilkagdi
Автор

Thanks for this! Really like the brevity of your walk-throughs on these questions, and it helps me a lot to try and translate them to different languages like C or C++ to better understand your explanations. Keep it up! :D

john_paul
Автор

watched it 3 times, neat and clean explanation

chesslectures
Автор

I'm glad that I solved this question on my own which I think is a result of following your channel. Even though the code that I wrote is a lot less elegant than yours but I'm glad that my thought is pretty much the same as yours and the time complexity is the same. Thank you for doing these videos!

xueweijiang
Автор

Never thought of using index - 2. I feel like I would never come up with that in an interview

johnvanschultz
Автор

Thanks for going over the daily leetcode challenge

Josh-tuji
Автор

Bro I just love the way u explain things by considering various types of test cases. Mad Respect for your efforts. Seriously !

nischayagrawalVlogs
Автор

You have superpower of explaining difficult things in easy words. The best part is you are teaching "how to think". BTW, what tool you use for drawing ?

ChiragVithlani
Автор

Can a stack be used to eliminate the edge cases?

tylerrussell
Автор

To explain further, if the array was 1 4 2 3, it would be favourable to change 4 to 2 rather than 2 to 4. So we should be reverse greedy and always try to minimize the change value

dheepthaaanand
Автор

Ah leetcode daily challenge questions are the best soln to provide. Love your content.

Had a question regarding your Google interview, what if one cannot come up wid something better than sub optimal soln in limited time. What's the best way to optimise for time? Thanks!

vasujain
Автор

Thanks for such an easy explanation 🙌

bitlandsaga
Автор

i love your channel neetcode. it’s been super helpful and i’ve made it to the final round at google in large part due to your help. thank you. do you think you’ll ever cover System Design questions?

AvaSession
Автор

Love you man thanks a lot for these videos. Even my friend didn't help me but you are doing it.

sharathkumar
Автор

4 Lines JS code! After watching this video I discovered something deadlock 4 pattern! :
var checkPossibility = function(nums) {
let breakage = 0;
for (let i = 0; i < nums.length; i++) {
const num = nums[i]
if (num < nums[i - 1])
breakage++
if (breakage > 1)
return false
if (nums[i - 1] > nums[i + 1] && num > nums[i + 2]) //[4, 9, 2, 5] //deadlock 4 pattern
return false
}
return true
};

rahatsshowcase
Автор

My solution cleared 320 test cases out of 335. And I wasn't able to come up with a way to handle edge cases like [3, 4, 2, 3]. It feels bad when you are this close!! Although good

varunshrivastava
Автор

Neighbour's lawn mower is becoming a frequent guest 😂 BTW great explanation as always 🙌

reflectedillumination
Автор

wht you are doing is amazing man! keep it up

sushantjha
join shbcf.ru