LeetCode 763. Partition Labels (Solution Explained)

  Рет қаралды 16,748

Nick White

Nick White

4 жыл бұрын

The Best Place To Learn Anything Coding Related - bit.ly/3MFZLIZ
Join my free exclusive community built to empower programmers! - www.skool.com/software-develo...
Preparing For Your Coding Interviews? Use These Resources
--------------------
(My Course) Data Structures & Algorithms for Coding Interviews - thedailybyte.dev/courses/nick
AlgoCademy - algocademy.com/?referral=nick...
Daily Coding Interview Questions - bit.ly/3xw1Sqz
10% Off Of The Best Web Hosting! - hostinger.com/nickwhite
Follow Me on X/Twitter - x.com/nickwhitereal
Follow My Instagram - / nickwwhite
Other Social Media
----------------------------------------------
Discord - / discord
Twitch - / nickwhitettv
TikTok - / nickwhitetiktok
LinkedIn - / nicholas-w-white
Show Support
------------------------------------------------------------------------------
Patreon - / nick_white
PayPal - paypal.me/nickwwhite?locale.x...
Become A Member - / @nickwhite
#coding #programming #softwareengineering

Пікірлер: 50
@meowmr9
@meowmr9 Жыл бұрын
Has someone ever told you how easy you make it to understand complicated problems and solutions? It's all because of you that I have started solving leetcode problems on my own and going to interview with TikTok very soon for a SDE role. Thanks for putting up all these videos online :)
@yashchamoli8695
@yashchamoli8695 Жыл бұрын
hey gentleman how your interview gone?
@Krishna42570
@Krishna42570 4 жыл бұрын
Plsss doooo hackerrank,codechef and alsoo continue doingg this leetcode...anyway ur explanation is awesome
@canobiggs
@canobiggs 4 жыл бұрын
Excellent explanation! Thank you.
@free-palestine000
@free-palestine000 4 жыл бұрын
nick coming thru with the solutions 💯
@irynasherepot9882
@irynasherepot9882 4 жыл бұрын
Thank you very much for your excellent explanation!
@flamencoag
@flamencoag 4 жыл бұрын
Thanks! It is more clear than explanation on Leetcode's Solution section
@quirkyquester
@quirkyquester 3 жыл бұрын
great explanation! Thank you Nick!
@maryannegichohi7063
@maryannegichohi7063 3 жыл бұрын
Your Explanations are awesome such a life saver
@karthikbhat181
@karthikbhat181 4 жыл бұрын
Thank you so much for the wonderful explanation :)
@lifeofme3172
@lifeofme3172 3 жыл бұрын
Loved the explanation. This is coding question from Amazon :)
@raam2508
@raam2508 4 жыл бұрын
very good explanation...a question Nick ! I have a Google screening round, a telephonic one. LeetCode questions are enough for practice ? Can you please tell me what should be the good material to clear that round? Thanks in advance.
@MrThepratik
@MrThepratik 4 жыл бұрын
shout out for explaining it so well.
@rollinggoronable
@rollinggoronable 2 жыл бұрын
old I know, but you explained perfectly, the "in at most part" made no sense reading it, you saying it was a head slap moment
@TharaMesseroux1
@TharaMesseroux1 2 жыл бұрын
Great Explanation! Thank you!
@geetusharma3923
@geetusharma3923 4 жыл бұрын
Great video. Thanks a lot 😊👍
@Abood99222
@Abood99222 3 жыл бұрын
thanks this really helped!
@reallifegambits
@reallifegambits 4 жыл бұрын
S will have length in range [1, 500] then why base condition?
@NeverGiveUp186
@NeverGiveUp186 4 жыл бұрын
Excellent approach..I wish you could be a professor at my college 🙌🙌🙌🙌
@shubhamchourasia2265
@shubhamchourasia2265 3 жыл бұрын
You are fabulous. Just want to know how do u approach such non trivial problem/solution ?
@u2blr
@u2blr 3 жыл бұрын
Really nice video. This question statement is very confusing. Your explanation make it easy to understand
@kamalkumar945
@kamalkumar945 2 жыл бұрын
Thank You Nick
@abhimanyusaini5
@abhimanyusaini5 3 жыл бұрын
Thanks, Nice explanation :)
@udaychatterjee4424
@udaychatterjee4424 3 жыл бұрын
Wow! Great solution
@anupamanair1299
@anupamanair1299 2 жыл бұрын
excellent solution
@chilld3666
@chilld3666 4 жыл бұрын
nice job!!!!
@Cccc-es3tu
@Cccc-es3tu 3 жыл бұрын
good explanation, but i think in line 14, i should equal to start , right?
@Noname-wp6zt
@Noname-wp6zt 3 жыл бұрын
Cool explaination
@sahithimangalapalli3068
@sahithimangalapalli3068 2 жыл бұрын
absolutely helpful :)
@GiggsMain
@GiggsMain 2 жыл бұрын
How is it constance space? Isn't last_indices an array which is O(n) space?
@kirank3368
@kirank3368 3 жыл бұрын
You are awesome 👏🏽
@sunnyday12131
@sunnyday12131 3 жыл бұрын
good explanation ! Happy2021
@90krishika
@90krishika 4 жыл бұрын
We can do it without the extra space of int[]
@babumon5351
@babumon5351 4 жыл бұрын
You are awesome..
@chenpeter4817
@chenpeter4817 2 жыл бұрын
clear explanation
@divyabharti9879
@divyabharti9879 3 жыл бұрын
For loop should be int i = start instead of 0 .
@uzumakinaruto6945
@uzumakinaruto6945 2 жыл бұрын
The answer in my case is wrong by changing the like 17 BY arr.push_back(end+1-start); gives a fine answer
@subramanyammalepati8655
@subramanyammalepati8655 3 жыл бұрын
awesome
@vikramchaudhary440
@vikramchaudhary440 3 жыл бұрын
I always like your video first before watching it
@mrfred456123
@mrfred456123 4 жыл бұрын
"Wouldn't be one of my videos if I don't mess up!!"
@irynasherepot9882
@irynasherepot9882 4 жыл бұрын
Because he is a human
@lettttt5557
@lettttt5557 4 жыл бұрын
❤️❤️
@deeproy2719
@deeproy2719 2 жыл бұрын
got it after seeing it in 2nd time
@karankanojiya7672
@karankanojiya7672 2 жыл бұрын
Respect++
@mohammedharoon1167
@mohammedharoon1167 2 ай бұрын
wow 🤩🤩🤩🤩🤩🤩🤩
@revanthsaireddyreddammagar268
@revanthsaireddyreddammagar268 12 күн бұрын
class Solution(object): def compressAndGetRanges(self, rangeDict): # Compress overlapping ranges in the given rangeDict and return the compressed ranges cRanges = [] # Stack to store compressed ranges for key, value in rangeDict.items(): print(key, value) # Check if the stack is not empty and if the current range intersects with the last range in the stack if len(cRanges) != 0 and self.isIntersection(value, cRanges[-1]): # Merge the intersecting ranges and push the merged range onto the stack cRanges.append(self.mergeRange(cRanges.pop(), value)) else: # Push the current range onto the stack cRanges.append(value) return cRanges def isIntersection(self, range1, range2): # Check if two ranges intersect return (range2[0] >= range1[0] and range2[0] = range2[0] and range1[0]
@hannahr5037
@hannahr5037 4 жыл бұрын
reprisigning
@ps8883
@ps8883 4 жыл бұрын
Why your channel don't show how many subscribers you have?
@lugiadark21
@lugiadark21 3 жыл бұрын
Can people actually come with these solutions in a real interview without seeing this problem before lol?
@The_Promised_Neverland...
@The_Promised_Neverland... 2 жыл бұрын
MY CODE, ON MY OWN. kinda shitty class Solution { public: vector partitionLabels(string s) { vector res; int n=s.size(); unordered_map mpp; for(int i=0;i
LeetCode 735. Asteroid Collision (Solution Explained)
14:24
Nick White
Рет қаралды 20 М.
Как бесплатно замутить iphone 15 pro max
00:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 8 МЛН
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 27 МЛН
Каха заблудился в горах
00:57
К-Media
Рет қаралды 10 МЛН
Inside Out Babies (Inside Out Animation)
00:21
FASH
Рет қаралды 23 МЛН
LeetCode 146. LRU Cache (Algorithm Explained)
18:00
Nick White
Рет қаралды 116 М.
Partition Labels - Leetcode 763 - Python
14:29
NeetCode
Рет қаралды 37 М.
LeetCode Verifying an Alien Dictionary Solution Explained - Java
11:17
LeetCode 48. Rotate Image (Solution Explained)
10:18
Nick White
Рет қаралды 84 М.
LeetCode 442. Find All Duplicates in an Array (Solution Explained)
12:37
Google Coding Interview With A Facebook Software Engineer
49:59
Clément Mihailescu
Рет қаралды 929 М.
Why Isn't Functional Programming the Norm? - Richard Feldman
46:09
Coding Was Hard Until I Learned THESE 5 Things!
8:02
Nick White
Рет қаралды 26 М.
Запрещенный Гаджет для Авто с aliexpress 2
0:50
Тимур Сидельников
Рет қаралды 1,1 МЛН
iPhone 15 Pro в реальной жизни
24:07
HUDAKOV
Рет қаралды 502 М.
📱магазин техники в 2014 vs 2024
0:41
djetics
Рет қаралды 694 М.