Insertion of a Node in a Linked List Data Structure

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 800

  • @CodeWithHarry
    @CodeWithHarry  4 года назад +189

    Hope you understood. I have asked few questions on linked list in the video, answer zroor karna!
    Also if you share this playlist, that would be an immense help
    Playlist: ruclips.net/p/PLu0W_9lII9ahIappRPN0MCAgtOu3lQjQi
    Instagram- instagram.com/codewithharry

    • @ashmitmalik1864
      @ashmitmalik1864 4 года назад +1

      bhaiya video mein to first nahi hun lekin aapka comment like karne me first

    • @sudarshangosavi9923
      @sudarshangosavi9923 4 года назад +4

      Bhai... Exercises bhi laaya karo na pahile jaise ... @CodeWithHarry

    • @kashisharora6705
      @kashisharora6705 4 года назад +1

      Bro please make videos on Trees and graphs in Datastructure.

    • @lavishsingal4791
      @lavishsingal4791 4 года назад +1

      Bro this series in python also🙏🏻🙏🏻🙏🏻

    • @ramalk992
      @ramalk992 4 года назад +1

      Sir please make vidio for java😇

  • @pushkalshukla982
    @pushkalshukla982 4 года назад +102

    Best teaching methodology i had ever seen On DSA!!

  • @rickk3300
    @rickk3300 3 года назад +131

    15:55 O(1), because the pointer to the node after which another node has to be added, is given. So irrespective of the total no. of nodes in the linked list, it will run for a constant time. Hence O(1) time complexity.

  • @sarthakmoriya541
    @sarthakmoriya541 2 года назад +2

    The most hard working youtuber i have ever seen.The most hard working youtuber i have ever seen.The most hard working youtuber i have ever seen.The most hard working youtuber i have ever seen.

  • @bossgaming2735
    @bossgaming2735 2 года назад +4

    Harry bhai apka ehsaan zindagi bhar nhi bhoolunga
    Meri dil se dua hai apki har khwahish puri ho ❤️😘

  • @shivamjha6580
    @shivamjha6580 4 года назад +16

    Harry bhaiya you r truly legend for engineering student 🙏🙏
    I think u r better better better than my DS teacher 👍

  • @Rani-gv6pn
    @Rani-gv6pn 10 месяцев назад +1

    Sir ,humne bahut sare videos dekhe Hain other channel ke ,apna collage ,collage wallah sabhi ke per samajh nahi aaya per aapka sir ek baar mein hi samajh aa gay . amazing sir .....
    Thankyou so much.........😊

  • @nikhilsinghparmar3132
    @nikhilsinghparmar3132 4 года назад +5

    Sir apke video upload hote se hi main download kr leta tha toh uspr comment nhi kr paata tha so i waited for this video so that I could comment... Sir aapne pucha tha k apke examples topic smjhne m help krte h ya nhi toh sir I just want to say... I started learning dsa from so called famous youtube channels but the conclusion was I was about to leave coding but I always enjoyed watching your videos so I saw your course - sir your teaching skills ,your body language, your accent ,your notes ,your examples are insane and learning from you is the best thing ever happened with me.. Thanks a lot sir for your notes ,tutorials, hardwork and for everything ❤

  • @T-KJ
    @T-KJ 4 года назад +59

    O(1) [15:59]

  • @vihansamvedi7939
    @vihansamvedi7939 Год назад +156

    Remember- Head of the list is not a node but a reference to the first node in the list.

    • @prasadagalave9762
      @prasadagalave9762 Год назад +8

      Head is pointer type of node and also it is refrance to first node

    • @rishimaurya3267
      @rishimaurya3267 Год назад +3

      In this lecture head is also node in which store data and link to other node

    • @ritikmehta4811
      @ritikmehta4811 11 месяцев назад +2

      First node in the linked list is regarded as head node and its address is used in head pointer

    • @kishankhanna10
      @kishankhanna10 8 месяцев назад

      Muchh needed👍🏽

    • @vihansamvedi7939
      @vihansamvedi7939 8 месяцев назад

      @@kishankhanna10 ❤️

  • @yanshikarajput7399
    @yanshikarajput7399 3 года назад

    sir is genius...........bina interaction ke bhi bhi sir ko pta chal gya ki bacho ne O(n) kha hoga..........maine bhi yhi kha tha.......

  • @chessnerd649
    @chessnerd649 3 года назад +47

    15:53
    Time Complexity for Inserting after a node = O(1)
    Because the pointer to that node is already given, so in every case, we are inserting the node at a constant time.

    • @motivationalkk6074
      @motivationalkk6074 9 месяцев назад +1

      bro for inserting of node in the end time complexicity should 0(1) because it is end nnn

    • @itachu.
      @itachu. 8 дней назад

      ​@@motivationalkk6074 no nut November?

  • @jashanpreet8646
    @jashanpreet8646 4 года назад +93

    Kon kon chahata hai ki harry bhai java ka full tutorial banae
    Like kro
    👇👇👇

    • @rishabpant2391
      @rishabpant2391 4 года назад +2

      Ha harry bhai please banao

    • @jashanpreet5668
      @jashanpreet5668 4 года назад +2

      Please banao mujhe app developer ban na hai

    • @MereDaddyJi
      @MereDaddyJi 4 года назад +1

      @@jashanpreet5668 bhai flutter and dart padho

    • @maheshwarikale7407
      @maheshwarikale7407 4 года назад +1

      Me too...harry sir please vidio for java.. As u made c in 15 hr like that please please please please

    • @shankarkale5648
      @shankarkale5648 4 года назад +1

      Please harry sir java pe vidio banado 😇and thanks for the content u r providing us for free❤️

  • @shivamshresth6005
    @shivamshresth6005 4 года назад +13

    You are explaining in the best possible manner . Thank you bhaiya!😇
    You made it INTERESTING 😃

  • @AdarshSingh-cb5yf
    @AdarshSingh-cb5yf 4 года назад +3

    Sir this DS series is best ........
    (Sabhi tutorial series se )......
    And your notes are awesome....
    Very thankful sir

  • @surajbugade
    @surajbugade 4 года назад +4

    15:53 time complexity is O(1) . It will take constant time.
    Edit : Harry Sir Heart to banta h😁

  • @Biswajit-_-Das
    @Biswajit-_-Das 3 года назад +2

    Vai, apka samjhane ka tarika bohot acha hai.... finally it fits into my mind forever.... Thanks vai ....

  • @wehomosapiens
    @wehomosapiens 3 года назад

    Bhai ..har jagah samjhne ki koshish kari..par yahan par ek tarfa tareeke se sabh clear hogaya.
    Loveyabro💖

  • @ranajyoti99
    @ranajyoti99 Год назад +4

    Sir u r nind blowing teacher big fan of u sir kya teaching style hai sb crystal clear ho gya a big salute sir

  • @harshitachaurasia1246
    @harshitachaurasia1246 4 года назад +32

    16.02
    Time complexity for adding after a node is O(1)

  • @swapnilbhojwani5587
    @swapnilbhojwani5587 4 года назад +4

    15:56 time complexity is O(1) thanks harry bhai for these great videos♥️♥️

  • @StudyStuff-pk7gv
    @StudyStuff-pk7gv Год назад

    Best video on Linked List.
    I never found such an easy explanation before.
    wish I watched this before my exams

  • @ColorKraft
    @ColorKraft 4 года назад +2

    Best teacher for coding thanks sir

  • @factified9892
    @factified9892 Год назад +2

    Just completed this lecture of yours Harry Bhai and it was wonderful as usual. Thanks a lot for the session!

  • @riyapatil2350
    @riyapatil2350 2 месяца назад

    I have practical day after tomorrow!! Really thankful to you for such a great teaching🥺🙌

  • @Mrugen_patel
    @Mrugen_patel 4 года назад +22

    15:56 Time complexity of inserting a node after O(1)

  • @ayanavadas6154
    @ayanavadas6154 3 года назад +9

    16:01 O(1) is the time complexity for Case 4: Insert after a Node.

  • @pushkalshukla982
    @pushkalshukla982 4 года назад +1

    Following Ur complete DSA course since long....

  • @channelpro2284
    @channelpro2284 4 года назад

    You are best programmer in you tube.

  • @prabhatkeshari2976
    @prabhatkeshari2976 3 года назад

    You are the best teacher ever i seen

  • @webcreationstudio7088
    @webcreationstudio7088 3 года назад +9

    15:57 the time complexity will be o(1)

  • @b_d_c556
    @b_d_c556 2 года назад +3

    15:55 O(1) is the time complexity because we have to insert a node after a given node ; we don't have to traverse the entire linked list

  • @harish5466
    @harish5466 2 года назад +1

    best explanation ever....Great teaching

  • @namansethi1767
    @namansethi1767 4 года назад +2

    Thanks bro with your hardwork i can learnn programming very well🙏

  • @b_107_satyakisaha6
    @b_107_satyakisaha6 3 года назад +1

    harry proves the quote a king does shout all day he is the king.

  • @kajalpal6220
    @kajalpal6220 3 года назад +4

    Case 4 will be O(1) as traversal is not required. We already know the node after which we have to insert the new node. So we can perform the operation in constant time by altering the linkage.

  • @ronakmaniya2005
    @ronakmaniya2005 4 месяца назад +1

    15:56
    Insert after a node -> O(1)

  • @harshitachaurasia1246
    @harshitachaurasia1246 4 года назад +6

    Excited for next video!

  • @gajjalaharsha
    @gajjalaharsha 4 года назад +7

    O(1) is time complexity for case 4

  • @kashishd1182
    @kashishd1182 3 года назад +4

    time complexity will be O(1) for inserting a node after a node

  • @amritanshsinghgautam4001
    @amritanshsinghgautam4001 2 года назад

    harry bhai dil jit lia h aap ne bhai yr

  • @recteenopubg9198
    @recteenopubg9198 Год назад

    Still Worthy. More love and Respect to you Sir.

  • @rishavkumar3061
    @rishavkumar3061 3 года назад

    Sir ji salute hai aapko .❤️ Very hard working 😘

  • @samarth_mittal
    @samarth_mittal 4 года назад +3

    Sir, Please make playlist on NodeJs, NodeJs tutorials in web development playlist are not enough to understand it completely🙏🙏, mene web development (front-end) aapse hi seekha, and backend(NodeJs) bhi aapse hi seekhna chahta hu but web dev ki series mei node js theik se samajh nhi aaya, jis tarah javascript ki separate playlist aapne banai hui hai usi tarah NodeJs ki banadoge toh maza aa jaega.

  • @ayushkumarmishra1858
    @ayushkumarmishra1858 4 года назад +3

    Please continue the c++ course, I am eagerly awaiting Harry bhaii. It's been very long you have not added any video... Please add 🙂🙂🙂

  • @satyambajpai9326
    @satyambajpai9326 2 года назад +3

    simple and easy explanation!

  • @gsshinde24
    @gsshinde24 4 года назад +7

    For case 3 Insert at end - we can make time complexity O(1) maintaining one last pointer similar to head.
    Last ptr will point to last node of list.

  • @utkarshmangal6559
    @utkarshmangal6559 2 года назад +1

    You are a king sir.

  • @LofiWonderland0721
    @LofiWonderland0721 Год назад

    you are like an lifeline for coder

    • @hustlegamerz
      @hustlegamerz Год назад

      I am new here
      can you pls tell me about the language (like c, c++,java etc.) in which this playlist is going on⁉️⁉️

  • @ujjwalmaurya915
    @ujjwalmaurya915 2 года назад

    hats off the way you teaching.... great harry bhai.

  • @sudhanshupal6970
    @sudhanshupal6970 3 года назад

    bht badiya ache se smj aaya great

  • @soni.himansh
    @soni.himansh 4 года назад

    Bhai you are the best. I love your teaching style..

  • @benugopalkanjilal2567
    @benugopalkanjilal2567 10 месяцев назад

    Case 4:O(1) because the pointer is already given and it's obvious that we have to add nodes after another nodes each for a constant time.

  • @vimalkumarchaudhary1913
    @vimalkumarchaudhary1913 4 года назад

    U r world best teacher

  • @maheshsangule1912
    @maheshsangule1912 2 года назад +3

    15:55 time complexity for insert after node is 0(1)

  • @param4259
    @param4259 2 года назад +2

    At 16:01 the time complexity will be bigOh O(1) as the q is constant and the value of q has been assigned already. So yes, it will be O(1)

  • @piyushgamingytpubglover.2213
    @piyushgamingytpubglover.2213 Месяц назад +1

    nice video sir ji💌💌💌💌💌

  • @mamatashee2367
    @mamatashee2367 4 года назад

    The way you explain just woo...w,,,n just waiting for watch 1M+ subscribers of CodeWithHarry

  • @janvikhadgi6468
    @janvikhadgi6468 3 года назад

    sir understood!! Time complexity me issue but abhi samjha

  • @sukanyaghosh24
    @sukanyaghosh24 3 года назад +3

    Harry bhaiya you are the best ❤️
    Unlike the rest ❤️
    Thanks for building our future ❤️
    You are like a guardian angel to us ❤️

  • @AhmedRaza-ty7zq
    @AhmedRaza-ty7zq Год назад +1

    15:59 Time Complexity will be O(1)
    as it runs in constant time.

  • @arkcoder9925
    @arkcoder9925 Год назад

    congratulation sir for 5 million subscribers

  • @alkaranisnha3812
    @alkaranisnha3812 3 года назад +1

    Best teacher ❤️

  • @codingchampians7268
    @codingchampians7268 4 года назад +1

    Very nice, interesting Harry bhai

  • @urviupadhyay1639
    @urviupadhyay1639 3 года назад +2

    15:58 time complexity is O(1)

  • @janvibahuguna865
    @janvibahuguna865 4 года назад

    sorry harry bhai video thodi der se dekhi
    best video

  • @AK-yt4xw
    @AK-yt4xw 3 года назад

    bhai u are a saviour !!! thank you

  • @somadutta3685
    @somadutta3685 3 года назад

    Love you sir from West Bengal..❤️

  • @adarshkumargupta.
    @adarshkumargupta. 2 года назад +1

    thank you harry bhai!!!!!!!!!!!!

  • @ranvijaysingh9929
    @ranvijaysingh9929 2 года назад

    16:00 - O(1) Bcz pointer after which the node is to be inserted is given ,so o(1)

  • @lesGo.8963
    @lesGo.8963 4 года назад

    Harry bhai is the King Kong of coding 🤗

  • @ambapatel9925
    @ambapatel9925 2 года назад

    you are such a gem🤠

  • @falakhasija2813
    @falakhasija2813 3 года назад

    We love you Harry sir!! The best of alllll!!!

  • @himankjeshwar8636
    @himankjeshwar8636 Год назад +1

    15:57 - Time complexity for Insertion after a node is O(1).
    since we don't have to traverse each and every element of the linked list because the node is already given

  • @omkarbhoir9819
    @omkarbhoir9819 4 месяца назад

    16:04 Time Complexity of Insertion after a node is O(1) , as the node after which the element is to be added is given ,so it will take the same time irrespective of any given value

  • @anonymusk9397
    @anonymusk9397 4 года назад +5

    Bro make this series in Python too please🙏🙏🙏🙏🙏🙏

  • @TravelingSane
    @TravelingSane 3 года назад

    best guy harry bhai

  • @satvikmittal4487
    @satvikmittal4487 3 года назад +1

    16:00 time complexity for case 4 is O(1)

  • @ajaylearningcentre8898
    @ajaylearningcentre8898 2 года назад

    wah wah 😍 cha gye bhai lage raho Harry bhai

  • @arushraj3807
    @arushraj3807 3 года назад +1

    u r amazing ,hats off 2 u❤❤

  • @kiranshinde03
    @kiranshinde03 3 года назад

    16:03 insert after a node, O(1) ❤️

  • @arooshaaroosha3203
    @arooshaaroosha3203 3 года назад

    Oh god i love this man..you are genius.❤

  • @udaykirankavaturu6942
    @udaykirankavaturu6942 Год назад

    Harry bhaiya done with this thank you

  • @lokeshpatil6595
    @lokeshpatil6595 4 года назад +1

    Data structure ke liye 1-2 books sabse acchi batado harry bhai. Study acchi hogi

  • @jerrygamingyt695
    @jerrygamingyt695 4 года назад +2

    Awesome video
    Thanks for teaching us 💟

  • @leogaming5895
    @leogaming5895 2 месяца назад +1

    16:05 O(1) ❤

  • @Shubham-jz7ec
    @Shubham-jz7ec 4 года назад

    Bhai case 4 me maza aa gya👍

  • @hiteshkumar6792
    @hiteshkumar6792 3 года назад +1

    16:09 - Time complexity is O(1).

  • @anuragkumarverma
    @anuragkumarverma Год назад

    but its okkk ap bht ache s smjhate ho really thanks for it

  • @sarveshkapoor7177
    @sarveshkapoor7177 4 года назад +2

    The time complexity of insertion after a given node is O(1)

  • @royalprince_ff
    @royalprince_ff Год назад

    Thank you sir for this valuable hardwork its still useful for me ... grateful for this ❤️🙇

  • @rajatdhiman8429
    @rajatdhiman8429 Год назад +1

    thx

  • @Filmyfan396
    @Filmyfan396 3 месяца назад

    15:55 Time Complexity is O(1) because the pointet is already given and we don't need tk traverse tha list for this.

  • @anuragpatwa4337
    @anuragpatwa4337 Год назад

    Thanks harry for the explainning linlkist

  • @dakshkesarwani663
    @dakshkesarwani663 4 года назад +1

    Time complexity is O(1) for insert after a node(4)

  • @simplesadharan6112
    @simplesadharan6112 Год назад

    harry bhai kas ap hmare college me as a teacher pda dete yar faltu time burbad h college harry is the best👍👍👍👍👍👍👍👍❤❤

  • @kaushalshinde3920
    @kaushalshinde3920 3 года назад +1

    5:41 Time Complexity :- O(1)

  • @prathameshnaik4710
    @prathameshnaik4710 4 года назад

    best teaching sir

  • @ThatGuy0275
    @ThatGuy0275 2 года назад +1

    16:00 O(1) as q is already given so we don't need to traverse through the list.

  • @shristijalan3983
    @shristijalan3983 4 года назад

    Your videos are just awesome