- Видео 35
- Просмотров 17 854
Intuit & Code
Добавлен 9 сен 2024
Welcome to Intuit & Code! 🎉
I started this channel to give back to the coding community that has given me so much. My passion for teaching and explaining complex concepts in a simple, fun way has driven me to finally share my journey with all of you.
Here, learning will never feel like a chore-because I believe in "Study with Fun!" My approach is all about making coding feel intuitive, enjoyable, and approachable.
And hey, while "I may not claim to be a pro coder, I am a pro explainer! " 😄
So, if you’re looking for a place where learning feels less like a lecture and more like an adventure, you’ve come to the right place.
Thank you so much for the support-your love and encouragement mean the world to me. Let's dive into the world of code together! 💻💡
Don’t forget to subscribe and join the Intuit & Code family! ❤️🔥
I started this channel to give back to the coding community that has given me so much. My passion for teaching and explaining complex concepts in a simple, fun way has driven me to finally share my journey with all of you.
Here, learning will never feel like a chore-because I believe in "Study with Fun!" My approach is all about making coding feel intuitive, enjoyable, and approachable.
And hey, while "I may not claim to be a pro coder, I am a pro explainer! " 😄
So, if you’re looking for a place where learning feels less like a lecture and more like an adventure, you’ve come to the right place.
Thank you so much for the support-your love and encouragement mean the world to me. Let's dive into the world of code together! 💻💡
Don’t forget to subscribe and join the Intuit & Code family! ❤️🔥
2583. Kth Largest Sum in a Binary Tree - LeetCode POTD - 22 October 2024
Hello Bhai Intution smjhe toh code krlo and submit kr do !!✅🍻
If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️
Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁
Go for 1.25x Speed if video seems slow to you
* Share Video with Your Friends If you want to see channel Grow 🤜🤛
Milte hain next video me jb tk
Notes : leetcode.com/problems/kth-largest-sum-in-a-binary-tree/solutions/5951786/very-clean-clear-code-dfs-bfs-2-approaches-full-concept-illustrations
Slide-Marks:
00:00 Intro
00:20 Question Explanation
02:31 Possible Approach Discussion
04:50 DFS [ Brute ]
13:27 Kth larges...
If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️
Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁
Go for 1.25x Speed if video seems slow to you
* Share Video with Your Friends If you want to see channel Grow 🤜🤛
Milte hain next video me jb tk
Notes : leetcode.com/problems/kth-largest-sum-in-a-binary-tree/solutions/5951786/very-clean-clear-code-dfs-bfs-2-approaches-full-concept-illustrations
Slide-Marks:
00:00 Intro
00:20 Question Explanation
02:31 Possible Approach Discussion
04:50 DFS [ Brute ]
13:27 Kth larges...
Просмотров: 124
Видео
1545. Find Kth Bit in Nth Binary String - LeetCode POTD - 19 October 2024
Просмотров 16321 день назад
Hello Bhai Intution smjhe toh code krlo and submit kr do !!✅🍻 If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️ Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁 Go for 1.25x Speed if video seems slow to you * Share Video with Your Friends If you want to see channel G...
670. Maximum Swap - LeetCode POTD - 17 October 2024
Просмотров 24121 день назад
Hello Bhai Intution smjhe toh code krlo and submit kr do !!✅🍻 If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️ Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁 Go for 1.25x Speed if video seems slow to you * Share Video with Your Friends If you want to see channel G...
632. Smallest Range Covering Elements from K Lists - LeetCode POTD - 13 October 2024
Просмотров 49921 день назад
Hello Bhai Intution smjhe toh code krlo and submit kr do !!✅🍻 If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️ Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁 Go for 1.25x Speed if video seems slow to you * Share Video with Your Friends If you want to see channel G...
2406. Divide Intervals Into Minimum Number of Groups - LeetCode POTD - 12 October 2024
Просмотров 35428 дней назад
Hello Bhai Intution smjhe toh code krlo and submit kr do !!✅🍻 If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️ Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁 Go for 1.25x Speed if video seems slow to you * Share Video with Your Friends If you want to see channel G...
1942. The Number of the Smallest Unoccupied Chair - LeetCode POTD - 11 October 2024
Просмотров 20028 дней назад
Hello Bhai Intution smjhe toh code krlo and submit kr do !!✅🍻 If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️ Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁 Go for 1.25x Speed if video seems slow to you * Share Video with Your Friends If you want to see channel G...
962. Maximum Width Ramp - LeetCode POTD - 10 October 2024
Просмотров 57528 дней назад
Hello Bhai Intution smjhe toh code krlo and submit kr do !!✅🍻 If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️ Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁 Go for 1.25x Speed if video seems slow to you * Share Video with Your Friends If you want to see channel G...
921. Minimum Add to Make Parentheses Valid - A Valid BlindDate ❤️🔥- LeetCode POTD - 9 October 2024
Просмотров 117Месяц назад
Hello Bhai Intution smjhe toh code krlo and submit kr do !!✅🍻 If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️ Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁 Go for 1.25x Speed if video seems slow to you * Share Video with Your Friends If you want to see channel G...
1963. Minimum Number of Swaps to Make the String Balanced - LeetCode POTD - 8 October 2024
Просмотров 216Месяц назад
Hello Bhai Intution smjhe toh code krlo and submit kr do !!✅🍻 If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️ Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁 Go for 1.25x Speed if video seems slow to you * Share Video with Your Friends If you want to see channel G...
1813. Sentence Similarity III - LeetCode POTD - 6 October 2024
Просмотров 472Месяц назад
Hello Bhai Intution smjhe toh code krlo and submit kr do !!✅🍻 If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️ Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁 Go for 1.25x Speed if video seems slow to you * Share Video with Your Friends If you want to see channel G...
567. Permutation in String - LeetCode POTD - 5 October 2024
Просмотров 448Месяц назад
Hello Bhai Intution smjhe toh code krlo and submit kr do !!✅🍻 If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️ Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁 Go for 1.25x Speed if video seems slow to you * Share Video with Your Friends If you want to see channel G...
1331. Rank Transform of an Array - LeetCode POTD - 2 October 2024
Просмотров 320Месяц назад
Hello Bhai Intution smjhe toh code krlo and submit kr do !!✅🍻 If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️ Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁 Go for 1.25x Speed if video seems slow to you * Share Video with Your Friends If you want to see channel G...
1497.Check if array pairs are divisible by k - LeetCode POTD - 1 October 2024
Просмотров 425Месяц назад
Hello Bhai Intution smjhe toh code krlo and submit kr do !!✅🍻 If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️ Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁 Go for 1.25x Speed if video seems slow to you * Share Video with Your Friends If you want to see channel G...
1381. Design a Stack With Increment Operation - LeetCode POTD - 30 September 2024
Просмотров 159Месяц назад
Hello Bhai Intution smjhe toh code krlo and submit kr do !!✅🍻 If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️ Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁 Go for 1.25x Speed if video seems slow to you * Share Video with Your Friends If you want to see channel G...
432. All O`one Data Structure - LeetCode POTD - 29 September 2024
Просмотров 507Месяц назад
Hello Bhai Intution smjhe toh code krlo and submit kr do !!✅🍻 If You Love the HardWork I put into making video then support atleast by dropping a like, or if you can't even do that then koi na bhai, thanks for watching ❤️ Video Thodi badi ho gyi but concept smjhne pr dhyn do pura smjhoge 😁 Go for 1.25x Speed if video seems slow to you * Share Video with Your Friends If you want to see channel G...
641. Design Circular Deque - LeetCode POTD - 28 September 2024
Просмотров 1,1 тыс.Месяц назад
641. Design Circular Deque - LeetCode POTD - 28 September 2024
731. My Calendar II - LeetCode POTD - 27 September 2024
Просмотров 659Месяц назад
731. My Calendar II - LeetCode POTD - 27 September 2024
729. My Calendar I - LeetCode POTD - 26 September 2024
Просмотров 357Месяц назад
729. My Calendar I - LeetCode POTD - 26 September 2024
2416. Sum of Prefix Scores of Strings - LeetCode POTD - 25 September 2024
Просмотров 364Месяц назад
2416. Sum of Prefix Scores of Strings - LeetCode POTD - 25 September 2024
3043. Find the Length of the Longest Common Prefix - LeetCode POTD - 24 September 2024
Просмотров 628Месяц назад
3043. Find the Length of the Longest Common Prefix - LeetCode POTD - 24 September 2024
2707. Extra Characters in a String - LeetCode POTD - 23 September 2024
Просмотров 1,8 тыс.Месяц назад
2707. Extra Characters in a String - LeetCode POTD - 23 September 2024
386. Lexicographical Numbers - LeetCode POTD - 21 September 2024
Просмотров 493Месяц назад
386. Lexicographical Numbers - LeetCode POTD - 21 September 2024
214. Shortest Palindrome - LeetCode POTD - 20 September 2024
Просмотров 695Месяц назад
214. Shortest Palindrome - LeetCode POTD - 20 September 2024
241. Different Ways to Add Parentheses - LeetCode POTD - 19 September 2024
Просмотров 607Месяц назад
241. Different Ways to Add Parentheses - LeetCode POTD - 19 September 2024
179. Largest Number - LeetCode POTD - 18 September 2024
Просмотров 1,2 тыс.Месяц назад
179. Largest Number - LeetCode POTD - 18 September 2024
884. Uncommon Words from Two Sentences - LeetCode POTD - 17 September 2024
Просмотров 1,1 тыс.Месяц назад
884. Uncommon Words from Two Sentences - LeetCode POTD - 17 September 2024
539. Minimum Time Difference - LeetCode POTD - 16 September 2024
Просмотров 613Месяц назад
539. Minimum Time Difference - LeetCode POTD - 16 September 2024
1371. Find the Longest Substring Containing Vowels in Even Count - LeetCode POTD - 15 September 2024
Просмотров 1,8 тыс.Месяц назад
1371. Find the Longest Substring Containing Vowels in Even Count - LeetCode POTD - 15 September 2024
2419. Longest Subarray With Maximum Bitwise AND - LeetCode POTD - 14 September 2024
Просмотров 746Месяц назад
2419. Longest Subarray With Maximum Bitwise AND - LeetCode POTD - 14 September 2024
1310. XOR Queries of a Subarray - LeetCode POTD - 13 September 2024
Просмотров 142Месяц назад
1310. XOR Queries of a Subarray - LeetCode POTD - 13 September 2024
Its ok ! When your exams get end plz post your solution videos regularly. I'm really missing your explanation videos 😅 and you are the only saviour of my POTDs coz I'm at learning stage, right now !! Come back soon with your awesome videos 😄 !!
Bro why are you not posting more videos🤒
Actually my end sem exams started and unable to find extra time to make videos Eventually I also missed potd a few days back so my streak also broked Will Start posting when exam over
@@Intuit_and_Code which college?
Yooooooo, good to see you again bro. How are you doing? This problem was okay for me, I wish all the medium problems are like this😢😢... but I couldn't even understand some of them....😂😂😂😂. Anyways, the way you taught BFS, within couple of minutes, I just remembered how I learnt it the day before my semester exam😂😂😂😂😂😂😂. Damn, good ol' days... Probably one of the better days in my college life😂😂😂. I still remember both BFS and DFS clearly(like how it's done and what it is). The optimised 2nd way was a bit confusing, watched it again and understood🤜🏽🤛🏽. It was another quality video.... So thanks bro... Keep it up🔥🔥🔥🔥
Doing great, its like my end sems about to begin in few days + drives are going on. So just been hella busy nowadays I dont know if i can be able to make videos for sometime 😫
@@Intuit_and_Code It's okay bro, take care of the sem exams and drives for now✊🏽✊🏽
Broooo, understanding from videos is so much better than reading dry lectures in editorial and solutions😂😂😂😂. But today, I have mixed feelings about this. Like the use of binary search, to solve this is pretty amazing🔥🔥, but then again, I have a question unanswered still after watching this... "Why do we have to invert it when k > mid or answer is in the mirror world?"😢😢 I could think of some explanations maybe, but none of my self-explanation is not concrete enough😢😢. I don't want to be rude, it's just that this will keep bugging me for a long time😂😂😂, sorry. I understood the other parts pretty well though. Thanks for another great explanation🤗🤗 Edit: I think I got it. Please tell me if I am correct or not. The reason we are inverting the result, is the fact that we never worked with inverted digits in the actual codes like we did in dry runs, but the right side(the mirror world) needs to be inverted. In the dry run as the digits were mentioned, it got a little confusing for me I guess, and to think of it, it is pretty simple😂😂😂😂. Anyways thanks man.
And yes, I wanted to write this in your earlier comment, but RUclips again didn't want it to get posted.😮💨😮💨 So I am writing here... Yes, I did face some problems while solving, in these situations I go to chatgpt and understand from it's explanation, the do some dry runs on it(I tell chatgpt to do the dry runs for me😂😂😂😂)... Anyways your videos are way better than those dry ahh notes/explanation on chatgpt. And we/I completely understand your situation. I also have placement situations ongoing😂😂😂. So no worries bro, you should definitely look into that matter first. And I wish you all the best for your placement opportunities🔥🙏🏽🙏🏽
@@RajarshiBangal Thanks for been that Understanding bro 🔥
Yeah you got it right, so there might no need for me explaining it up 🍻
Recursion wala approch mujhe samaj aa gaya kaafi clean and clear code h apko
Bhaiya aap konse college se ho aur kon se year me.. Aapki placement ho gyi hai kya
final year & sgsits indore
Broooooo, long time no see😂😂😂, how are you doing? Hope you are great. For me it's another day, another close call for daily challenges. I first thought that today's problem would be a drag(and also I read "at most one swaps" as "at least two swaps"🫡), but then I realised after watching this, it's just a bunch of dry runs.... "Do a dry run and understand" should be a motto😂😂😂😂. I tried to solve the last few days' problems on my own, and solved 2 of them, others took a lot of time to understand. I hope I will get there one day.... Anyways, It's good to have you back bro🤜🏽. And thanks for the explanation as always😂😂
yeah man! things are just getting busy with college and all there were submissions internal viva company drives and all... 🥵 Dont know for now i can keep the consistency but will see what i can do. Do you have trouble solving any problem this last few days ?
@@Intuit_and_Code ok bro, no worries, you should look at your college matters first✊🏽. And yeah, I faced some problems but I figured it out using ChatGPT and dry runs(forcibly telling chatGPT to do dry runs for me). No worries bro. All the best for placement selections🔥🔥
@@Intuit_and_Code ok bro, no problem. You should look after college matters first, especially placement drives... I am also busy with placement drives and all in my college. I wish you all the best with your placement situations 🔥🔥🔥 And yeah, I faced some problems, but usually I solve it late at night and if I don't understand a problem I understand it from chatGPT and then try to dry run and get it clear(I forcibly tell chatGPT to do dry runs for me😂😂😂).
Done!!❤
Thanks sir❤ for a lovely explanation
Great explanation❤
Done👍
Today is 15 Oct, I know Raj personally :)
P.S: nice content
your methods are unique
great explanation and approach But have a doubt ... why you used this approach instead of using a min-heap which will reduce TC to O(NlogK) and SC to O(K) like if i get asked similar question is this sorting + sliding window approach enough or i shall try going further with min-heap
Reason Why I used this approach is because this is the approach my mind make me click If this doesn't work i might think in pq direction In Interview this approach is also valid too tell first then if you know know the pq approach you can go for it ki like tell the interview that instead of map we can go with pq and can solve question in that & that way.. Even though if you cant tell the interviewer the pq approach he might get satisfied with sliding window also It do also have complexity near about O(MlogM)+O(M)=O(MlogM) M = total list size
ayy thankyou
Yo bro, it's done, and I have finally caught up with the daily problems😂😂... Using a map can be really helpful, and I always overlook when and where to use it. Like today, when we are going to store the list numbers, I thought we were gonna store it in an array or something😂😂😂😂, and while watching the code, then I realised that we can also use a map😂😂😂.... Man, I always overlook basic things😮💨... Anyways, the explanation was crystal clear, I didn't have much problem to understand. And yeah what you said in the beginning of the video, it could have been a medium problem if the whole sorting part is clear. Come to think of it, we have been doing lots of sorting these few days in leetcode😂😂😂😂. Anyways, as always thanks bro✊🏽✊🏽🔥
Yeah, sometime i guess which data structure should i have to use based on the trend of leetcode, like priority queue days are going so i thought lets solve this by pq 😂 today feel like i am reply your comments here and there 🍻🤣 As always thanks for watching, Your Comments really make my day. [ It overmake today though 😅]
@@Intuit_and_Code 🤣🤣 I just wanted to get back on consistency, so I just did a speedrun of solving the problems. And since I am not an amazing coder because I am still learning these cool stuff from you😂😂, so I think that I should leave a little token of appreciation under your videos🤣🤣🤣. It's nothing much. And to tell you the truth, I don't really keep commenting on channels on RUclips, but I found yours different(friendly I guess) and also I like your teaching style. So I stuck around😂😂.
Great explaination sir. But I am not able to solve question by myself I feel very demotivated.. Plzz tell something.. I am in third year and next year will begin my placement session..
Did you completed any SDE sheet ? This question is quite tricky and if you know and solve some question like this then only we can solve this one. No need to worry next time you will surely solve similar kind question ✅
@@Intuit_and_Code Thanku bro
Thank you bhaiya, I was eagerly waiting for your video.
That's Great !! ❤
It is also very similar to previous problem... To tell you the truth, at the time when I was watching this, it was way too late at night😂😂😂😂 and I was a bit drowsy. As soon as I finished with the code, I just went straight to bed😂😂😂😂. I submitted the code at 5:15 or something 😂😂😂😂, close call, huh!!😅😂 Anyways, I understood almost everything, I mean there wasn't much to understand after the previous video. But I gotta say, your explanations makes things way easier to understand. Thanks bro ✊🏽✊🏽
Yeah, that submission time is like Rajarsh : "Ab toh mujhe maut se khelne ki adadt ho gyi hain, maut ko tak se chu kr wapis" 😂😂😂😂
@@Intuit_and_Code 🤣🤣🤣🤣 literally bro
Yo... The examples were awesome😂😂. I also thought that I will use tuples, but then I changed my mind and used a class-object instead. I could somewhat relate it to CPU scheduling techniques in OS😂😂😂(I absolutely loved that topic).... And yes, I totally agree, I understood a lot from this... Thanks bro for the great explanation 🔥🔥🤜🏽
bdiya 🌟
Bro why sweep line algorithm fails here class Solution { public int minGroups(int[][] intervals) { HashMap<Integer,Integer> map = new HashMap<>(); ArrayList<Integer> help = new ArrayList<>(); HashSet<Integer> set = new HashSet<>(); for(int i=0;i<intervals.length;i++){ map.put(intervals[i][0],map.getOrDefault(intervals[i][0],0)+1); map.put(intervals[i][1],map.getOrDefault(intervals[i][1],0)-1); help.add(intervals[i][0]); help.add(intervals[i][1]); } Collections.sort(help); int max = 0; int sum = 0; for(int i:help){ if(set.contains(i))continue; sum += map.get(i); max = Math.max(max,sum); set.add(i); } return max==0?1:max; } } It gives wrong answer for 34th testcase Output 99999 Expected 100000
Yoooo, I hope you are doing great. In case you might be wondering, why I was silent for last 2 days or so😂😂😂😂, I was really busy "pandal hopping" with my friends😂. As you may know, this time of the year we have Durga puja, and since I live in Kolkata, it is a pretty huge deal. And like most people here, I also hangout(a lot) in these times with my friends😂😂. I was usually so tired after getting home, I really couldn't try to sit and code😢😢. So I asked a friend to help me maintain the streak, thanks to him my "streak" is still intact😂😂😂. Now I regret it so much so I am going to do the codes of last two days myself(after understanding concepts)... And here I am😂😂.
Bro, understood everything up until the better approach. The optimal approach is a bit tricky, I need to reassess the codes and do dry runs to understand it completely. Thanks bro for the great explanation 🔥🔥🔥🔥. edit: BTW, what have you written above the "optimal" word in the optimal approach? It seems Japanese to me. What does it mean🤔🤔🤔?
@@RajarshiBangal It literally means nothing, I just want to write Japanese so i randomly draws character & it seems stylish to me so i didn't erased it 🤣🤣 I am just so childish and all so that thing happened ( When i didnt get to watch anime for some days this type of doore i would get 😛)
Heya bhai, thats what i was thinking what happens -> i thought you were sick and all. But great it was not the problem. Missed You 🥲 Lets get back to the game 🤜🤛 This question is quite good and 11th oct question was more great to do, You will surely learn new things 🌟 Kolkata me jadu-tona hota hain mene suna !? (~music) trayamabakm yhaja mhe credits fear files 😂
@@Intuit_and_Codeha ha😂😂. Now I am back✊🏽✊🏽. I will have to keep up the consistency. And yeah, to tell you the truth, a lot of things happen in Kolkata, including Jadu-tona(I don't believe in those personally)... Kolkata is a mixture of a lot of flavours😂😂😂, I only accept the ones I like, and let the others flow. And there are a lot of things happening here besides Durga Puja, like the case of a doctor in a hospital in Kolkata(maybe you have heard of it). But still, as a permanent resident of Kolkata, I would suggest visiting Kolkata, especially in Puja days in future, I promise that you won't regret it....🤗🤗
@@Intuit_and_Codeyo, I still play Pokemon games(not Pokemon Go) even as a 20 years old adult 😂😂😂😂😂😂😂. So it's very normal for me. I also watch a little bit of anime here and there. And I read a translated Japanese light novel series, and for that I can name 3 Japanese dialects😂😂😂😂😂😂. But I can't read, write or understand Japanese 😂😂😂😂.
Done!!
bhaiya can u plss explain the 72 and 73 line
In simple terms, this line checks if the current friend we are seating is the one we are interested in (the "target friend"). The array v stores information about each friend (arrival time, departure time, and a unique friend identifier). The code is looping through this array, assigning chairs to each friend. Each friend is assigned a chair when they arrive, and we want to know which chair the "target friend" gets. The line if (v[i].frnd == target) checks if the current friend (v[i].frnd) is the same as the "target" friend (the one we're trying to find). If it is, the code returns the chair number that was just assigned to that friend, as indicated by return chair;. In essence, the moment we find and seat the friend we're interested in, we stop the process and give the answer (the chair number).
00:06 Solving LeetCode POTD 1942 - Number of the Smallest Unoccupied Chair 00:48 Understanding and solving advanced level questions on LeetCode. 02:12 Storing arrival and living time in an array 02:48 Understanding seat allocation based on the number of friends in LeetCode problem 03:59 Understanding seat occupation based on arrival time. 04:36 Occupying the smallest unoccupied chair 05:47 Allocation of empty seats among guests. 06:24 Understanding seat allocation based on friend numbers 07:35 Understanding chair allocation order for faster 'freeing' 08:10 Explanation of index changes in the given case. 09:18 Comparing arrival time, departure time, and last time using friend index and new index 09:56 Understanding the concept of tuples and their usage. 11:17 Understanding the importance of data structures and scalability 11:55 Understanding data structures and variable storage in C++ 13:10 Understanding nodes, structures, and values usage in coding 13:44 Creating a vector to store arrival time, departure time, and fund index together 14:51 Understanding representations and their values 15:26 Comparison of arrival times for two variables a and b 16:39 Prioritize sorting smallest available chair first 17:13 Understanding the smallest unoccupied chair in a value-based order set. 18:21 Understanding priority queue and implementing order set 18:54 Understanding the smallest unoccupied chair using a real-life example. 20:09 Understanding seat prioritization based on departure time 20:46 Understanding seat occupation logic based on index allocation 21:55 Discussing the availability of free seats and comparing arrival and departure times. 22:35 Understanding the concept of arrival time and smallest departure time for comparison 23:46 Sorting nodes based on arrival time for chair allocation 24:22 Understanding the concept of the smallest unoccupied chair index 25:37 Confusion over seating allocation 26:10 Allocating chairs to friends based on arrival time 27:21 Waiting for the third friend to vacate the chair by 10:00 27:53 Understanding the concept of Next Available Chair Index 29:03 Understanding the concept of unoccupied chairs with time details. 29:36 Understanding Priority in Seating Arrangement 30:44 Understanding seat allocation based on given scenario 31:20 Implementing data structures in coding 32:26 Accessing values using dot operator 32:59 Creating and manipulating objects in different cases 34:08 Understanding priority in busy schedules 34:46 Comparing arrival and departure times for seat availability 35:58 Understanding the concept of unoccupied chairs and their values. 36:32 Finding the time when a chair will be free. 37:31 Understanding the importance of arrival time
Thank a lot for providing such descriptive Timeline ❤🍻🫡
Thank you bro, you are awesome. I searched extensively yesterday but struggled to understand the concepts. Your explanation made everything much clearer, and I truly appreciate your help.
aise ques to hard category me hone chahiye🥶
🥲 Yup But did you get the logic from the video ?
@@Intuit_and_Code ya
bro, suggestion: Slow down your pace. You sound a bit anxious. You have an amazing presentation in front on you. But take a pause, and slow down. Your presentation will flow with more clarity. I totally understand what you are saying. just want you to get even better and gain crazy subscribers!
Thanks for the suggestions I do speed up the video during editing as many were saying videos are long 😢 Due to it, the video might seem that I am not taking any break😅 I will see what I can do.
god level explaination!!!!!!!!
@@aradhyaagrawal4766 😌✨💪
Bro, Can you pls make the video in english? Your content is really good and I want to continue following along with you to better understand. Can you really please consider to make the content in english?
I Really love your enthusiasm for my content thankyou for that. I am thinking of releasing my videos in both Hindi and English But due to time constraint Couldn't able to do that I know to Boost my channel i need to cover my videos in English, but for now i want to continue in hindi but promising you will soon do something about the english thing. 🫡
bro share your linkedin
You can find it from my leetcode profile.
Thanks man, this was really helpful!
Glad to hear it!
Already completed, just came to check out the video. It was almost 90% the same as yesterday's code😂😂😂.... The video was really fun. The "nalla launde" are very relatable. But we should aspire to be like that "Sigma" dude😂😂😂😂😂😂😂😂. Anyways bro, thanks 😂.
Mere dimag ko nalla jyada sahi lga sigma bolte time like bina soche smjhe 😂😂😂
I would say ki 99% same tha bs bracket ka sign change Krna tha na 😅
@@Intuit_and_Code 😂😂
Thanks bro, 6:20 cleared my doubts
Glad to hear that
Amazing solution
Yup Thank You !
Concpet ✅ mic sound❌ Bhaiya mic quality improve kriye please 🥹🥹
XD in my previous videos mic quality was good na ?! 🤔 I think mene kuch recording mic setting gadbad kr di hain, I also think that mic quality was not good after i shooted the video but now nothing can be done I will see the settings.
@@Intuit_and_Code ya, iss video me mike quality khrb hai kafi, you should check for it
@@prakhargupta60 Okay, I will try to change the settings again.
Hey bro, I completed it. It was a fun video... really🤣🤣🤣. Now I also want to pair with a girl🥲. But I guess I have no rizz😂😂. Anyways it was like yesterday's question. It was easy to understand, though I couldn't understand all that AB and [C] stuff they put at the beginning. Now about your follow up question, I tried to solve it. But its seems after changing my code, to work with these, the code is not generating proper results. Like take an example: '] } { ) ( [' (remove the spaces between). I don't think that this can be done in 2 swaps, it will take 3 swaps. But my code is generating 2 as the answer. Personally I want to be in this situation ") [ )" where '[' = Indian boy(me😁) and ')' = Russian girl, but jokes aside, I couldn't solve this problem, and now I am frustrated. You know what I will attach my code, (I already done it using multiple variables for indian, american and russian boys and girls, but that didn't worked either). Even 'ChadGPT' is giving stupid answers..... Please tell me what I am doing wrong 😞... sorry import math def minSwaps(s: str) -> int: boys = 0 girl = 0 for char in s: if(boys > 0 and (char == ']' or char == '}' or char == ')')): boys -= 1 else: if(char == '[' or char == '{' or char == '('): boys += 1 else: girl += 1 single = boys if(single == 1): return 1 return math.ceil(single/2)
Your comments becoming more funnier daily 😂 I will solve it later today and then will answer you.
@@Intuit_and_Code okay boss😅😂
@@RajarshiBangal The mistake you are doing is taking all boys same, you have to use different variables for different country boys Corrected Code: import math class Solution: def minSwaps(self, s: str) -> int: indian_boy, indian_girl = 0, 0 american_boy, american_girl = 0, 0 russian_boy, russian_girl = 0, 0 for char in s: if char in [']', '[']: if indian_boy > 0 and char == ']': indian_boy -= 1 else: if char == '[': indian_boy += 1 else: indian_girl += 1 elif char in ['}', '{']: if american_boy > 0 and char == '}': american_boy -= 1 else: if char == '{': american_boy += 1 else: american_girl += 1 else: if russian_boy > 0 and char == ')': russian_boy -= 1 else: if char == '(': russian_boy += 1 else: russian_girl += 1 single_indian = indian_boy single_american = american_boy single_russian = russian_boy ans = 0 if single_indian % 2 != 0: ans += 1 single_indian -= 1 if single_american % 2 != 0: ans += 1 single_american -= 1 if single_russian % 2 != 0: ans += 1 single_russian -= 1 total_single = single_indian + single_american + single_russian ans += math.ceil(total_single / 2) return ans It is just heavy implementation of the logic i teached nothing changed. Now you might be able to get what mistake you did and learn from the code
@@Intuit_and_Code yeah, I have got it. Like I said, I tried it using multiple variables, but couldn't get it to work... Because what I did is add up all the number of single boys(american, indian and russian) and work with the result instead😮💨😮💨.... Which was very stupid of me, and it was essentially converting the whole problem into a similar kind of problem in leetcode. That's why it was giving me a similar answer to the leetcode one. Now I understand it. Thanks bro🔥. edit: I also found out that I didn't kept track of girls from other countries, I used a single girl variable instead🤡🤡
@@RajarshiBangal apne liye vese bhi kha different countries girl alg rhetin hain Ba ladki hona chaiye and jinda hona chaiye 🫠
Follow Up Question : What if '{}' and '()' also allowed ? Think them as foreign people XD [ ] - india { } - america ( ) - russia Try This it will be easy if you understand the approach i teached
bhaiya what does overlapping of l and r pointer signify exactly??
We can say if l and r overlapped then we had covered the whole prefix part and suffix part of the given small string If they are not overlapping means we didn't able to cover the remaining part by using single sentence only
When the l (left) and r (right) pointers overlap or meet, it means we've successfully matched words from both the prefix (beginning) and suffix (end) of the two sentences. The key is that the total number of matched words from both sides (l + r) should cover the entire smaller sentence without overlapping the unmatched middle part. This ensures the two sentences are similar based on the problem's requirements
Yo, I completed it late, but got it just in time😮💨. Anyways, today's problem was easier than I thought. I was messed up trying some map or stuff like that😂😂😂😂. It was pretty understandable after I solved it thanks to you. Anyways, I guess now I understand why you asked about LinkedIn in the other comment of mine. I don't even know what happened, I rarely open the stupid app(haven't even decorated my profile, it's just there as a dummy😂😂). And I am not even that active on social media too. I am way too lazy or too busy to play games😂😂😂😂. I just want to tell you, don't get discouraged if someone tries to demotivate you. Because there will always be people who are willing to encourage you to do the same. Keep up the good work bro🤜🏽🤜🏽. And thanks again 😁
Naa bhai it's totally fine I posted about being a knight on leetcode and write about my journey Post : shorturl.at/9bVTC And nothing bad sort of anything happened there, everyone was just appreciating Its just seems some people got jealous and stuff so he commented on RUclips only 😂 I don't clarify anyone anything but you are bro so just to let you know I use gpt only for basic codes like when I thought it will be time consuming to write a part which I already know and I think nearly everyone do it ( using tools )
@@Intuit_and_Code man, I saw your post now, I am really happy for you🔥🔥. I also have a goal, I need to achieve in LeetCode, though it is different from yours. Once I achieve it, I will surely tell you about it🤣🤣🤣. Well it will take a long time 🤣🤣.
@@RajarshiBangal Yup, Rooting for you to complete your goal faster ❤🔥
Thank You Bhai ❤
Your welcome !
Another great explanation thank you ❤
Glad you liked it! ☺️
Bhaiya deque ka bhi use kar k solve kar sakte hai ... Bhaiya apka linkedin mil sakta hai kya
Yup there are different approaches available I teached what I used during solving, but I will look into the deque approach also 👍 About id : You can get it from notes to leet-profile to linkedin Go and blame me if you also think that guy way 🥂
bro what an explanation ! thankyou
Thanks a lot !!
Contest m cheating krke Knight pahochta h tu aur fir Linkedin pe flex krta 😂😂
Tereko kaise pata Bhai ki vo cheating karta hai
@@Sam-gx9xl @Sam-gx9xl Submission dekh bhai iska, leetcode contest m chatgpt ka code copy paste krta hai Link nahi dal paa rha m, yt comment delete kr de rha
😂 Nice one you got me bruh XD 🍻
Hahaha..😂😂 looks like someone got really jealous here..bruh for ur kind information I see his leetcode solution and videos both but I don't found anything like cheating at all..
@@Intuit_and_Code hn hasle, andr s to tujhe bhi pta h aur mujhe bhi, keep faking 🤡
Yo... Welcome back, how are you doing? I have done my code on time, I watched your video as well. As helpful as always. Today's problem was almost easy, I could have done it on my own, but couldn't slide the window😂😂😂😂. Oh well, after watching your video, it's done😂😂🎉. Thanks bro🤜🏽
Yup, I am better than ever 😅 Its Just great, I haven't uploaded videos for 2 days. Did ya solved the problem ? Missed me 😂 And want to confirm do you use linkedin ?
@@Intuit_and_Code yeah, on 3rd October, I really needed the understanding. But I used some "other" methods and understood the topic somehow. On 4th October, I solved the problems all by myself 😁😁😁😁. I won't say that I didn't miss you 😂😂😂 but yeah, I completely understand the college situation 😅😅. And I do use linkedIn, I also wanted to give you a heads up about it, but I couldn't post the comment for some reason 🥲. Hope this gets posted😂😂.
@@RajarshiBangal LOL 😂
Aare bhaiya ekdum baap level explanation pura crystal clear samaj aa gaya... maja aa gaya bhaiya
Yup, thats want I always want 🔥
if you can please make seperate playlists for all the possible patterns used in problem solving...it would be of great help!!
Nice Idea 🌟, But ! It's like not possible with the schedule I have. You might have to wait for it.
00:05 Learning about permutation in string and sliding window concept 00:44 Understanding the concept of permutation in string 01:54 Understanding permutation in strings. 02:27 Understanding permutation and factorial concepts 03:34 Understanding factorial and permutation 04:15 Understanding different permutations in strings 05:22 Demonstrating permutation generation and checking in strings 05:58 Identifying exact permutation in a string 07:12 Understanding permutation using next permutation concept 07:46 Generate next permutation for current string 08:53 Permutation in String involves applying permutations on a string repeatedly to generate new strings. 09:22 Understanding complexity in permutations calculation 10:28 Understanding the complexity of permutations in strings 11:07 Permutation is like arranging letters in any order. 12:11 Understanding permutation generation through string manipulation. 12:47 Understanding the permutation of strings based on their lengths. 13:50 String permutation generation and validity check 14:20 Understanding permutation using characters in a string. 15:28 Generating all permutations of a string efficiently. 16:03 Permutation in String - LeetCode POTD 17:13 Understanding string permutation using hashmap and counting technique. 17:43 Handle incomplete substrings by setting answer to false 18:42 Understanding string size and character count in fixed size areas. 19:16 Understanding the optimal approach for character counting. 20:20 Increasing frequency of next character 20:58 Understanding and implementing the process of permutation in strings. 22:10 Understanding sliding window concept in LeetCode problems. 22:39 Understanding sliding window concept for problem solving. 23:45 Checking if a string can be formed from another string by counting characters 24:16 Exploring string traversal and frequency counting using sliding window concept 25:23 Comparing character counts using an optimal approach 25:57 Discussing match count and window frequency 27:01 Implementation Logic of Permutation in Strings Mapping Count 27:35 Converting values and storing frequencies in a map 28:37 Checking frequency and mapping. 29:07 Understanding character manipulation for value changes and counting 30:23 Explanation on indexing for covering lines 30:55 Concept clarified to a great extent
Salute to Your work bro 🫡 Mujhe bhi nhi pta tha itna padha diya mene ❤🔥😂
sir aap god hoo!!!!!!!!!!!!!!!!....literally itna in depth explaination .....please dont ever stop making such videos!!!!
Thank You aradhya 😉