Flip String to Monotone Increasing - Leetcode 926 - Python

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


0:00 - Read the problem
1:20 - Memoization explanation
4:20 - Coding Memoization
8:25 - Explaining Optimal Solution
13:52 - Coding Optimal Solution

leetcode 926

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

thanks man paused ur video at 2:56 coded myself ac in first go....i really like your way of teaching

samyakjain
Автор

Was researching this just an hour ago, you freaky psychic....

symbioticparasite
Автор

omg this man never disappoints .sending you good

janvidalal
Автор

It's 6:38 here in Italy. I slept less than 4h and my First thought After watching the request was: "Just count the numbers". Feel like a chad

Distruttore
Автор

Neetcode your explanation is an Uff! You are God Sent !

clandestina_genz
Автор

Thank you so much. Amazing explanation.

sarvesh
Автор

This daily series is insane Neetcode!
Thanks, from India!

oneplusgeek
Автор

This is such a tricky one to figure out

KnightMirkoYo
Автор

@neetcode wondering what motivated you to create second channel which looks same as first

dhamotharakannanv
Автор

Why not get flips to the left and right of each index? For each position, number of 1s to the left+number of 0s to the right, then find the minimum over the list. Would take 3 passes, and O(n) space.
Of course, less elegant than the optimal solution, but simpler than the backtracking solution imo.

ashwin_kr
Автор

Fuck this kind of problem. It's really hard to come up optimal solution within 5 mins when you get the question

ray
Автор

Could you tell me the difference between the previous channel and this channel? Harder problem on this channel? Anyway, I subscribed 🫡

tetsuxyz