Reverse Nodes in k-Group | EP 11

  Рет қаралды 33,364

Fraz

Fraz

Күн бұрын

Lecture Notes: leadcoding.in/...
Watch the complete Linked List Series • Linked List Series
Relevel test relvl.co/yvy5
Business Development:
• upGrad:- relvl.co/0dx
• Urban Company:- relvl.co/lw8
• Vedantu:- relvl.co/ocn
• Curefit:- relvl.co/gg3
Frontend Development:
• Cred:- relvl.co/cls
• Digit:- relvl.co/op9
Backend Development:
• Cred:- relvl.co/omq
• 1mg:- relvl.co/g9a
• Digit:- relvl.co/5vn
• Razorpay:- relvl.co/mdc
• Yellow Messenger:-relvl.co/2ic
Question (codestudio) bit.ly/3u2fYgH
Question (leetcode) leetcode.com/p...
Placement Preparation Roadmap • Roadmaps for Placement
Hi, I am Fraz.
I am Software Engineer working at Curefit and I love teaching.
This is my Channel where I upload content related to Interviews and my personal experiences.
My contact details
Instagram :- / frazmohammad
Connect with me on LinkedIn :- / mohammad-f-bb4886157
Telegram Group t.me/LeadCoding

Пікірлер: 120
@KhushwantSinghZzzz
@KhushwantSinghZzzz 3 жыл бұрын
Time complexity: 0(n) -- we are iterating each node twice. Space complexity: O(n/k) -- memory used in recursion stack. Completed season 1. Like the way of explaining the problem and make questions easy to solve. Looking forward for season 2.
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Thanks , more will come soon
@aryansiroyajain8503
@aryansiroyajain8503 2 жыл бұрын
Season 1 completed....waiting for next......i m really happy i found ur channel😁
@nehathakur40
@nehathakur40 2 жыл бұрын
Videos are really informative the best part is that beginners can also watch these the way of explanation is literally the best!Good job👏👏
@rajkrishna8294
@rajkrishna8294 3 жыл бұрын
If possible sir, please try to upload sorting on Linked List :) 1) Merge Sort 2) Insertion Sort 3) Quick Sort
@eleveneleven4195
@eleveneleven4195 Жыл бұрын
One of the best series on LinkedList ❤
@deepakdass4710
@deepakdass4710 Жыл бұрын
Completed all the videos and coded all the problems by myself and I am sure everything was easy to understand. Thanks for this help
@KUNALPATIL-bw9qi
@KUNALPATIL-bw9qi 2 жыл бұрын
I completed this season. all doubt regarding the linked list is now clear time complexity is 0(n) space complexity is 0(n/k) thanks so much waiting for the next topic.....
@mohammadfraz
@mohammadfraz 2 жыл бұрын
Nice work! next season is also up
@sahilkhan_cs50
@sahilkhan_cs50 2 жыл бұрын
I am having doubt in the space complexity.The space complexity is O(n/k) if you include the stack involved in recursion.But in websites like gfg ,they dont consider this extra space and say that the space complexity for the algorithm is O(1) as no extra space is taken.So what should the space complexity be?Should I include the recursion stack or not?
@dp-ev5me
@dp-ev5me 2 жыл бұрын
too good to stop binging at season 1 end. very nice. Thank you Also, take recursion next, moving to dp without recursion will not be as helpful
@mohammadfraz
@mohammadfraz 2 жыл бұрын
That's the plan! Recursion is must. Please share krna
@sauravkumarsonu5539
@sauravkumarsonu5539 2 жыл бұрын
Like the very first season of series, bhaiya aap real guru ho, bahut kuchh sikhta hu aapse, waiting for more... ❤️. 🔥🔥🔥
@mohammadfraz
@mohammadfraz 2 жыл бұрын
Will upload soon
@avinaba_mazumdar
@avinaba_mazumdar 3 жыл бұрын
TC: O(n) ASC: O(n) Completed Season 1... eagerly waiting for Season 2... Thanks Bhaiyya
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Soon bro The space is O(n/k)
@shivarajput9719
@shivarajput9719 2 жыл бұрын
sir mene aapko kafi baar KZbin pr dekha but aaj pehli baar aapki coding wali koi video dekhi, Bhutt ache se smjhaya aapne, 2 din se ye question ni ho rha tha but aapki video dekhne k baad I was like "Bss itna easy tha ye" Nyc Explanation sir ❤️❤️
@vaidanshkukreja8970
@vaidanshkukreja8970 2 жыл бұрын
Please bring the next series on STACKS & QUEUES or STL and thanks for the knowledge i finished the whole series and many concepts are cleared now THANKS A LOT!!!
@mohammadfraz
@mohammadfraz 2 жыл бұрын
Abhi to more seasons will be coming on linked list
@pankajsharma1397
@pankajsharma1397 3 жыл бұрын
Finished the series. Waiting for next season brother!❤
@mohammadfraz
@mohammadfraz 3 жыл бұрын
will come soon
@ankit-ry3cz
@ankit-ry3cz 2 жыл бұрын
Time complexity= O(N) Space complexity= O(N/k) Completed this lecture..
@mohammadfraz
@mohammadfraz 2 жыл бұрын
Amazing , now more will come
@namanbhatia9872
@namanbhatia9872 3 жыл бұрын
bhaiya trees aur graph ki bhi series leh aaye
@mohammadfraz
@mohammadfraz 3 жыл бұрын
In future plan karte Hain
@namanbhatia9872
@namanbhatia9872 3 жыл бұрын
@@mohammadfraz okay bhaiya
@akashbabutammali4478
@akashbabutammali4478 2 жыл бұрын
Very good Explanation Brother, I have seen many videos to understand this problem, but most of them didnt explained in easiest way as you.
@Curlygirl02112
@Curlygirl02112 Жыл бұрын
your explanation is soo good i got the concepts clearly.
@SurajKumar-ml2vb
@SurajKumar-ml2vb 3 жыл бұрын
Bhaiya your explanation is exceptional 🔥...... I watched and implemented till now....please launch other episodes bof this series 🙏
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Soon , just keep spreading
@mgdesire9255
@mgdesire9255 3 жыл бұрын
season 1 complete can't wait for season 2 .... Bhaiya the way are you teaching is really amazing ,you explain every single step very smoothly..... this serise gonna be mahh all time fav... TC: O(N) SC:O(N/K)
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Thanks Noob ❤️❤️
@aryan_01793
@aryan_01793 2 жыл бұрын
Time complexity:- O(n) Space complexity:- O(n/k) The space complexity n/k, because we are creatint a new node, (number of nodes/ size of the group) number of times. Is my conclusion on Space Complexity right? @Lead Coding by FRAZ
@maitry6074
@maitry6074 Жыл бұрын
Lots of love and respect;
@beinghappy9223
@beinghappy9223 Жыл бұрын
Thanks for the awesome explanation
@amit9790singh
@amit9790singh 9 ай бұрын
I am comming from striver Sir video. I was not satisfy with their explaination. That's why I come here. The way you explain I am able to understand easily. How can do approach.
@BTECE_manichandT
@BTECE_manichandT 2 жыл бұрын
tq for such clean explanation
@rupampakhira8132
@rupampakhira8132 3 жыл бұрын
Thank You So Much Bhaiya❤ Completed this lecture😊
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Great Rupam, keep sharing bro.
@095udaykiran6
@095udaykiran6 Жыл бұрын
great explaination
@atozgyaaan8162
@atozgyaaan8162 2 жыл бұрын
finished this season bhaiya . waiting for season 02 and thanks for the awesome content .
@mohammadfraz
@mohammadfraz 2 жыл бұрын
You're welcome ❤️❤️
@abhayrai1724
@abhayrai1724 2 жыл бұрын
Best explaination specially in the end Of code ...❤️🎉🎉
@NirmalSilwal
@NirmalSilwal 2 жыл бұрын
time complexity - O(n) // for all nodes in the linked list space complexity - O(n-k) ~ O(n) // for recursive stack memory correct me if i am wrong 🙈
@RishavRaj-kn8nm
@RishavRaj-kn8nm 2 жыл бұрын
Bhaiya Very Well Explained!!!
@mohammadfraz
@mohammadfraz 2 жыл бұрын
Thank you ☺️
@pawanlok1776
@pawanlok1776 2 жыл бұрын
thank you for making this video ..
@ratnasanjay
@ratnasanjay 2 жыл бұрын
Thankyou bhaiya for this video
@shoryashokanda8973
@shoryashokanda8973 10 ай бұрын
Thankyou fo rthis series
@desihiphop4998
@desihiphop4998 2 жыл бұрын
bhaiya time complexity O(n) kyuki har node pe jaare ek ek krke aur space complexity O(n/k) kyuki k ke groups mein stack mein space lega isliye k pe depend krega !!!! great season bhaiya !!!! maja aagya !!!!!
@hameedmulani21
@hameedmulani21 2 жыл бұрын
Well explained! 👨‍💻🏅
@raghvendrakhatri5848
@raghvendrakhatri5848 2 жыл бұрын
Lect - 12 completed, sir love♥️ the way you explain each and every concept, please keep creating such wonderful content 💯 your playlist are helping me alot in understanding the topics and improving my skills. Thankyou bhaiya ♥️
@jatinmaheriya2343
@jatinmaheriya2343 2 жыл бұрын
Great explanation ! Thank you for such quality content😇
@suryaprakash1890
@suryaprakash1890 2 жыл бұрын
Thank for the great series bhayya completed season 1
@avirana2212
@avirana2212 2 жыл бұрын
Thanks🙌🙌
@arisahmed1105
@arisahmed1105 3 жыл бұрын
Bhai op series concept dimaag m Beth gye ik dum please DYNAMIC PROGRAMMING PR SERIES LAOO
@mohammadfraz
@mohammadfraz 3 жыл бұрын
yes bro, Laenge future me
@simranarora2817
@simranarora2817 2 жыл бұрын
Great explanation
@utkarshsingh5390
@utkarshsingh5390 2 жыл бұрын
Completed season 1: completed all the questions simuntaneously
@aditiranjan303
@aditiranjan303 2 жыл бұрын
Very nice explanation...pls make series for other topics too...
@shyamaharihar2425
@shyamaharihar2425 2 жыл бұрын
Amazing approach thanks :)
@atulyakharotia311
@atulyakharotia311 Жыл бұрын
17:49 ham agr starting mn next ko NULL se initialize karaden or fir loop ke andr sabse pehle next ko p->next de den to kya wo null pointer walli statement ko skip nahi kar sakte ?
@35_pandey_shubham89
@35_pandey_shubham89 11 ай бұрын
sir does returning a head gives the whole linkedlist?if no why do we always return only head while solving the problem not the whole linked nodes?
@shishirkj
@shishirkj Жыл бұрын
how do we know that recursion will give 4(90) as head and not as 5(85) because in reverse a linked list it gave the adress of last node
@nancyshah5272
@nancyshah5272 2 жыл бұрын
sir why do we do the work of reversing the first k group...why dont we hand over that too to the function itself??
@codingwithanonymous890
@codingwithanonymous890 2 жыл бұрын
Sir ek question tha like dyanmic programming mein memoozation se ho jaata hain but usko bottom up mein bahut confusion hota hain..so i just prefer memorization in coding rounds is there any chance of stack overflow
@mohammadfraz
@mohammadfraz 2 жыл бұрын
Yes sometime because of recursion we might exceed time and memory. So bottom up is better
@amandixit8342
@amandixit8342 2 жыл бұрын
ha bhaiya proper aise mast si recorded recursion ki series laaye
@mohammadfraz
@mohammadfraz 2 жыл бұрын
🔥🔥
@shraddhagulati3081
@shraddhagulati3081 9 ай бұрын
Bhaiya, I feel we can do it in one function. Check this I have done in javaScript function reverseKGroup(head, k) { if (head == null) return head; var current = head; var next = null; var prev = null; var count = 0; while (count < k && current != null) { next = current.next; current.next = prev; prev = current; current = next; count++; } if (next != null) { head.next = reverseKGroup(next, k); } if (count != k) { return reverseKGroup(prev, count); } return prev; }
@thenewway416
@thenewway416 2 жыл бұрын
Nice 👍
@alwaystrue5778
@alwaystrue5778 3 жыл бұрын
Bhaiya please tell how to prepare for aptitude
@mohammadfraz
@mohammadfraz 3 жыл бұрын
There is a playlist on my channel for interview preparation. I have explained in detail about it
@NirmalSilwal
@NirmalSilwal 2 жыл бұрын
thanks for the part1, enjoyed learning 💪
@aryanrastogi1335
@aryanrastogi1335 2 жыл бұрын
Java Solution: class Solution { public ListNode reverseKGroup(ListNode head, int k) { if(size(head)
@ishaankesari3723
@ishaankesari3723 2 жыл бұрын
Why linkedlist is better to use here then a array?
@rupampakhira8132
@rupampakhira8132 3 жыл бұрын
Finished the series😌
@SunnyGupta00
@SunnyGupta00 2 жыл бұрын
Reach++🔥
@girikgarg8
@girikgarg8 Жыл бұрын
Done!
@shyaamaltripathi5373
@shyaamaltripathi5373 2 жыл бұрын
Completed
@reetikgandate606
@reetikgandate606 2 жыл бұрын
🔥🔥🔥
@fardeenshaikh6434
@fardeenshaikh6434 3 жыл бұрын
bahut takleef hoti hai jab aap yogya ho aur log aapki yogyata na pehchane bhaiya bhut accha samjaya hai
@edwardkenway6822
@edwardkenway6822 2 жыл бұрын
Trees , Graph , Stack , queue Or Recursion pe series chaiye it's very IMP
@mdnadeem6343
@mdnadeem6343 3 жыл бұрын
op series bhaiya 🔥🔥🔥🔥
@mohammadfraz
@mohammadfraz 2 жыл бұрын
Shukriya
@kkumar07
@kkumar07 2 жыл бұрын
in last video why did u called recursion first and now ur calling next? after our work?
@divyansh1391
@divyansh1391 2 жыл бұрын
han bhaiya bilkul recursion ata hai but confidence nhi hai...so plz next series on recursion
@mdnadeem6343
@mdnadeem6343 3 жыл бұрын
O(N) time complexity and space complexity is O(N/K) and season-01 is complete
@mohammadfraz
@mohammadfraz 2 жыл бұрын
Awesome Nadeem ❤️❤️
@krishnapalsingh3164
@krishnapalsingh3164 2 жыл бұрын
naming is the most difficult thing - by fraz bhaiya 🙂🙂
@gopalsakhwala7986
@gopalsakhwala7986 2 жыл бұрын
recursion series pls
@aparnasah3677
@aparnasah3677 2 жыл бұрын
completed season 1 in a day...except design of hashmap and hashset....are they also imp..means are these two qus asked in interviews..🙂🤧 thank u sir for the amazing content and crystal clear explanation..✨😊
@prateekshrivastava2802
@prateekshrivastava2802 Жыл бұрын
No
@mohdfarhanahmed9416
@mohdfarhanahmed9416 3 жыл бұрын
Faraz Bhai->Abse aage ke videos mai Java code b provide kariye na kaisa b. Time-O(n) Space-O(n/k) basically proportional to list length, is it correct?
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Farhan , zada difference nahi hai , aap dekho C++ and java ka syntax almost same sa hi hai. Video bahot bada ban jaega agar sea kiya to aapka answer sahi hai
@bhavyagupta1389
@bhavyagupta1389 2 жыл бұрын
Waiting for next season
@mohammadfraz
@mohammadfraz 2 жыл бұрын
Already hai uploaded
@madamanchiashokchowdary9790
@madamanchiashokchowdary9790 2 жыл бұрын
nice
@mandeepdangi1030
@mandeepdangi1030 2 жыл бұрын
Bhai recursion par video bnado please with question
@mohammadfraz
@mohammadfraz 2 жыл бұрын
In future pakka
@mayankshahabadee8331
@mayankshahabadee8331 2 жыл бұрын
Done all videos bhaiya. Please Upload Season 2. Love your content bhaiya.
@mayankshahabadee8331
@mayankshahabadee8331 2 жыл бұрын
O(n),O(n/k)
@mohammadfraz
@mohammadfraz 2 жыл бұрын
aaega Jaldi hi
@scoobyman49
@scoobyman49 3 жыл бұрын
Finished series
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Wait for the next season ❤️. Did you like it?
@scoobyman49
@scoobyman49 3 жыл бұрын
@@mohammadfraz Yes . It's excellent.. I am 2+ years experienced candidate in product based company and love these kind of content which gives you broader perspective while solving engineering problems. [We can give better review comments to other developers as they tend to ignore complexity Analysis]
@kkumar07
@kkumar07 2 жыл бұрын
if linklist size ==2 then e->next == null so it returns same link list?
@akshyagarg2398
@akshyagarg2398 3 жыл бұрын
finished. when will be next season releasing
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Kafi jaldi aaega , please share karna series ko
@GauravKumarSingh-xd4dc
@GauravKumarSingh-xd4dc Жыл бұрын
season 1 completed🙂
@sageoustheory1957
@sageoustheory1957 Жыл бұрын
got it after second time
@user-bv6il2nk4t
@user-bv6il2nk4t 2 жыл бұрын
please create comprehensive series request like pepcoding , notes if python same question get desxcription , it will good , like vedio deka , we go description and see sem code python for same question code , comapre kar skte say tmre i need move data science . devops and web dev bnae bad me
@gengar_13
@gengar_13 2 жыл бұрын
Bhaiya, dsa sheet k question ka solution with explaination lao plz
@priyanshuranjan103
@priyanshuranjan103 2 жыл бұрын
Recursion wala smjh ni aya sir
@mohammadfraz
@mohammadfraz 2 жыл бұрын
Watch again bro , aajaega
@ritikgupta1133
@ritikgupta1133 2 жыл бұрын
exact time complexity will be k*O(n)
@vikeshdas3909
@vikeshdas3909 2 жыл бұрын
SIR BRING SOME MORE HARD QUESTION
@koraksengupta3554
@koraksengupta3554 2 жыл бұрын
Simpler approach was possible
@Sonu-tg6tg
@Sonu-tg6tg 2 жыл бұрын
Please make videos using JAVA
@mohammadfraz
@mohammadfraz 2 жыл бұрын
ok
Reverse Nodes in k-Group (NO EXTRA SPACE) | EP 12
19:51
Making an Algorithm Faster
30:08
NeetCodeIO
Рет қаралды 27 М.
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 16 МЛН
Merge Two Sorted Lists | EP 13
20:16
Fraz
Рет қаралды 26 М.
L21. Reverse Nodes in K Group Size of LinkedList
24:31
take U forward
Рет қаралды 85 М.
Kolkata Doctor Case
32:57
Nitish Rajput
Рет қаралды 12 МЛН
Harsh Truth of Java in 2024! Ft. Ultimate Java Developer @Telusko
28:46
Reverse Linked List | EP 10
22:27
Fraz
Рет қаралды 35 М.
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 16 МЛН