Circular Singly Linked List (Insertion at the Beginning)

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ย. 2024

ความคิดเห็น • 47

  • @dipeshsamrawat7957
    @dipeshsamrawat7957 3 ปีที่แล้ว +6

    02:38 And how can we have a tail pointer?
    For knowing this, look at the addToEmpty() [Named as circularSingly() in the last lecture] function of this lecture.
    Notice these points :
    1. addToEmpty() function is returning the Tail pointer!
    How? how the function is returning the Tail pointer?
    - Because that pointer's next part is pointing to the first node of the list, therefore, that pointer is Tail!
    2. Thus, by the Tail pointer we can easily complete our tasks and reduce the time complexity.
    And in this lecture, the addAtBeg() function is also returning the Tail pointer.
    How or why?
    - Because the pointer that it is returning whose next part is pointing to the first node of the list.
    Thanks :)
    I love Neso Academy.

  • @srinivasvoore
    @srinivasvoore 4 ปีที่แล้ว +9

    Thank you for providing the content. Most of my clg exams are aced by your videos only.

  • @DeepakKumar-nk3cv
    @DeepakKumar-nk3cv 4 ปีที่แล้ว +6

    Sir Ur content is very helpful
    But plzz upload lectures regularly 🙏🙏....

  • @96k_aesthetic
    @96k_aesthetic 11 หลายเดือนก่อน

    Tomorrow is my exam and your video helped me a lot. जय श्री कृष्ण सर।

  • @ritikshrivastava9442
    @ritikshrivastava9442 3 ปีที่แล้ว +1

    Khatarnak teacher ho aap

  • @沼氨
    @沼氨 3 ปีที่แล้ว +2

    Impressive from the beginning to the end!
    Thx U guys for providing a wonderful platform to learn ALL these amazing knowledges!!!

  • @akashsamui01
    @akashsamui01 ปีที่แล้ว

    Great teacher i ever been seen ❤

  • @jithendrasoorisetti2658
    @jithendrasoorisetti2658 ปีที่แล้ว

    Good teaching sir 👍 😊

  • @01.abhishekkumar33
    @01.abhishekkumar33 3 ปีที่แล้ว

    Exceelent sir ,in this programme I have learned the importance of function ,that we haven't work more on main function but we simply distribute our work in small small parts ,this is one of my favourite Lecture ,you are great sir

  • @Dnsx_plus
    @Dnsx_plus 3 ปีที่แล้ว

    I am so happy you have 1MILLION subscribers!! :D XD

  • @devanshchauhan6307
    @devanshchauhan6307 2 หลายเดือนก่อน +1

    but pls upload how we take input from the user

  • @monicabattacharya6416
    @monicabattacharya6416 3 ปีที่แล้ว +2

    Dear Neso Academy , Please reply 🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼. what is the difference between datastructures and advanced datastructures?

    • @barnabassolomon1629
      @barnabassolomon1629 ปีที่แล้ว +1

      the latter is data structure but advanced

    • @shubhamyadav4246
      @shubhamyadav4246 ปีที่แล้ว

      @@barnabassolomon1629 😂😂😂

    • @RahulBommi-j9l
      @RahulBommi-j9l หลายเดือนก่อน

      Complex and advanced form of data structures linear ,tree types,hash based,graphs etc... comes under advanced ds

  • @nageegundala1142
    @nageegundala1142 3 ปีที่แล้ว +1

    Sir, can you give complet source code single Linked list,double linked list and circular linked list

  • @aramvijay
    @aramvijay 2 ปีที่แล้ว

    what about the head pointer? newnode added at beginning , its address should be updated to head ?

  • @universalstarcpu9522
    @universalstarcpu9522 3 ปีที่แล้ว

    In 11th line of prgrm there is malloc(sizeof(struck node))
    What does malloc mean what does it do ?

  • @sonuengineer8205
    @sonuengineer8205 4 ปีที่แล้ว +1

    Sir please make a next lecture 👏

  • @robot67799
    @robot67799 ปีที่แล้ว

    Thanks you 💚

  • @utkarshlath9098
    @utkarshlath9098 4 ปีที่แล้ว +1

    sir how to makes notes out of your videos ?are you providing one in your app?or do i take screenshot and make a pdf or handwritten?

    • @Dnsx_plus
      @Dnsx_plus 3 ปีที่แล้ว

      I have like 50 notes on his videos, want them, I have them neatly organized in files.

    • @universalstarcpu9522
      @universalstarcpu9522 3 ปีที่แล้ว +1

      @@Dnsx_plus can u send them ?

    • @Dnsx_plus
      @Dnsx_plus 3 ปีที่แล้ว

      @@universalstarcpu9522 sure !

    • @RasheedKhan-nd1ru
      @RasheedKhan-nd1ru 3 ปีที่แล้ว

      @@Dnsx_plus can you please give me your phone number or insta id . I want your notes

    • @obito3207
      @obito3207 2 ปีที่แล้ว

      @@Dnsx_plus send me too

  • @sachinhadimani442
    @sachinhadimani442 3 ปีที่แล้ว

    Thanks

  • @raimasoni3013
    @raimasoni3013 3 ปีที่แล้ว

    realy helping can we have algorithm also ?

  • @ashwathbb6963
    @ashwathbb6963 2 ปีที่แล้ว

    Sir here u take only one one node .if we have to insert node to more then one node I mean list ...how to insert to list using tail
    .

  • @روزالاسدي
    @روزالاسدي 3 ปีที่แล้ว +1

    I need help, I have an error that appears when writing malloc
    #include
    #include
    struct node {
    int data;
    struct node* next;
    };
    struct node* addToEmpty (int data)
    {
    struct node* temp =malloc (sizeof(struct node));
    temp->data = data;
    temp->next=temp;
    return temp;
    }
    struct node* addatbeg(struct node * tail, int data)
    {
    struct node* newp=malloc(sizeof(struct node));
    newp->data = data;
    newp->next=tail->next;
    tail->next=newp;
    return tail;
    }

  • @NitinReddy-iw6ll
    @NitinReddy-iw6ll 5 หลายเดือนก่อน

    Wrong , line number 38
    Struct node * tail = head;

  • @tatsuyashiba5950
    @tatsuyashiba5950 4 ปีที่แล้ว +2

    Please upload trees🙏
    My exam is from 28

  • @shreepadabhat2240
    @shreepadabhat2240 3 ปีที่แล้ว +2

    U didn't explained how to insert to circular linked list with more than 2 elements...

    • @Dnsx_plus
      @Dnsx_plus 3 ปีที่แล้ว

      He did

    • @ritikshrivastava9442
      @ritikshrivastava9442 3 ปีที่แล้ว +2

      Loop laga ke C
      For(int i=1; i>data;
      If(I==1)
      Tail=addtoempty(data);
      Else
      Tail=addtoend(tail,data);
      }

  • @utkarshlath9098
    @utkarshlath9098 4 ปีที่แล้ว +2

    Sir please assure me ,I am from NON- CS background.Is your content enough for gate cse?do i need to practise anything apart from previous years gate papers after fully understanding and memorising your content?

    • @harshalkumar4538
      @harshalkumar4538 3 ปีที่แล้ว +1

      i think the concept is enough, but you should have problem solving skills to clear Gate exam. So try to solve as many questions as possible of Gate

    • @vengalrao5772
      @vengalrao5772 2 ปีที่แล้ว

      @@harshalkumar4538 hi bro I have a doubt !
      I am gonna sit for placements . I non-cs .
      I want to learn ds topics . But this channel has only some topics . Again in which channel can I find rest topics ?
      It would be help if you reply me . As early ?

  • @aravindks7636
    @aravindks7636 3 ปีที่แล้ว +1

    newnode->link = tail->link;
    tail->link = newnode;
    this isn't work forme
    but this works for me
    newnode->link = head;
    tail->link = newnode;
    head = newnode;
    can anyone say why didn't that works for me ?

    • @Dnsx_plus
      @Dnsx_plus 3 ปีที่แล้ว +1

      Weird, remember, no need for a head pointer, the tail pointer points to the last Node, and the last Node's 'next' value is the first Node, can you share your code so I can better understand what you're trying to say?

    • @kunalbabbar7399
      @kunalbabbar7399 3 ปีที่แล้ว

      At the end add this code-tail=tail->link

  • @bibekrawat2284
    @bibekrawat2284 3 ปีที่แล้ว

    Why this is not working ?
    void Display(node *tail){
    node *p=tail->next;
    while(p!=tail->next){
    cout

    • @nikhilrmane
      @nikhilrmane 2 ปีที่แล้ว

      While loop checks the condition first and then executes the statement(s), whereas do while loop will execute the statement(s) at least once, then the condition is checked.

  • @روزالاسدي
    @روزالاسدي 3 ปีที่แล้ว

    hello
    I need help, I have an error that appears when writing malloc
    #include
    #include
    struct node {
    int data;
    struct node* next;
    };
    struct node* addToEmpty (int data)
    {
    struct node* temp =malloc (sizeof(struct node));
    temp->data = data;
    temp->next=temp;
    return temp;
    }
    struct node* addatbeg(struct node * tail, int data)
    {
    struct node* newp=malloc(sizeof(struct node));
    newp->data = data;
    newp->next=tail->next;
    tail->next=newp;
    return tail;
    }