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.
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
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 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 ?
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 ?
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?
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.
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.
Thank you for providing the content. Most of my clg exams are aced by your videos only.
Sir Ur content is very helpful
But plzz upload lectures regularly 🙏🙏....
Tomorrow is my exam and your video helped me a lot. जय श्री कृष्ण सर।
Khatarnak teacher ho aap
Impressive from the beginning to the end!
Thx U guys for providing a wonderful platform to learn ALL these amazing knowledges!!!
Great teacher i ever been seen ❤
Good teaching sir 👍 😊
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
I am so happy you have 1MILLION subscribers!! :D XD
but pls upload how we take input from the user
Dear Neso Academy , Please reply 🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼. what is the difference between datastructures and advanced datastructures?
the latter is data structure but advanced
@@barnabassolomon1629 😂😂😂
Complex and advanced form of data structures linear ,tree types,hash based,graphs etc... comes under advanced ds
Sir, can you give complet source code single Linked list,double linked list and circular linked list
what about the head pointer? newnode added at beginning , its address should be updated to head ?
In 11th line of prgrm there is malloc(sizeof(struck node))
What does malloc mean what does it do ?
Sir please make a next lecture 👏
Thanks you 💚
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?
I have like 50 notes on his videos, want them, I have them neatly organized in files.
@@Dnsx_plus can u send them ?
@@universalstarcpu9522 sure !
@@Dnsx_plus can you please give me your phone number or insta id . I want your notes
@@Dnsx_plus send me too
Thanks
realy helping can we have algorithm also ?
Wdym?
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
.
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;
}
Write ( struct node*)malloc
Wrong , line number 38
Struct node * tail = head;
Please upload trees🙏
My exam is from 28
Fr
U didn't explained how to insert to circular linked list with more than 2 elements...
He did
Loop laga ke C
For(int i=1; i>data;
If(I==1)
Tail=addtoempty(data);
Else
Tail=addtoend(tail,data);
}
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?
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
@@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 ?
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 ?
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?
At the end add this code-tail=tail->link
Why this is not working ?
void Display(node *tail){
node *p=tail->next;
while(p!=tail->next){
cout
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.
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;
}