I am mechanical students l got AIR 6th rank in GATE PI . 11 times I qualified GATE. l did my M Tech from IIT Madras. This year I am writing GATE CSE. Neso academy vedios is better than other online source for GATE aspirants as my opinion. Thank you so much.
I would like to add why time complexity is O(1) for deleting at beginning but O(n) for deleting at end. If there is tail pointer, we can directly access the last node and add new node to it- So that is O(1). But for deleting, we need to find second last node which requires traversing.
we can also form a dynamically allocate array...during the run time we can input the size of the array. so we do have not to worry about the size of the array.
very true. the reason given for why we need a linked list vs an array for the stack was not valid. During the run time also we can dynamically allocate the array size.
the main idea behind the linked list is that we can use memory not only in a contiguous fashion. for extreme sets of data, allocating continuous memory is not a great idea to go with. yes you can realloc array and add size dynamically but in the linked list the data can be stored in available memory cells during run time and the storage need not be continuous
But what if while pushing a node into linkedlist we keep track of both top and previous top (by another pointer variable) And then push This will reduce time complexity to O(1)
Can anyone explain how time complexity of removing the last node is O(n) (at 6.06) He is saying to get the address of 40, to make it's next as null, we need to traverse the entire LL, But can't we access it by saying top.prev Or We can't access as we're dealing with singly LL here And so the time complexity will be O(n) here and O(1) in case of DLL
But sir STACK use LIFO property and in the linked list represention first node print in first so how stack property is true in linked list represention Thank you ❤
I am mechanical students l got AIR 6th rank in GATE PI . 11 times I qualified GATE. l did my M Tech from IIT Madras. This year I am writing GATE CSE. Neso academy vedios is better than other online source for GATE aspirants as my opinion. Thank you so much.
Bhai videos hota edited karke bhi galat hai
11 times qualified
11 times 😂
Bro became father before going for M Tech 🤣🤣
@@anonymouscse6433😂😂
Yes of course... I'm from Pakistan I can't afford a package of Neso App but this channel helped me a lot.
One of the best teachers on the internet! Many thanks.
Best explanation
I love the background ....pleasant for eyes and font size ....everything perfect
Please upload the series soon.i need to study.your way of teaching is amazing.. I'm requesting plz upload as soon as possible
The best explanation for the begginer student and also it looking best❤ thank you sir
Excellent Explanation
why don't do they like this video? Please motivate the maker of the contents for a wonderful presentation of the topics.
I would like to add why time complexity is O(1) for deleting at beginning but O(n) for deleting at end. If there is tail pointer, we can directly access the last node and add new node to it- So that is O(1). But for deleting, we need to find second last node which requires traversing.
What an explanation ❤🎉
Sir I've viva and practical tomorrow
Thanks sirji ❤️
Thank You So Much Neso Academy, Please Keep Making Videos You Are Really Doing a Great Job.
I found such a great explanation of all these topics here.
God bless neso academy
Plz upload the videos as soon as possible...
Thanks for this series and it is superb.
we can also form a dynamically allocate array...during the run time we can input the size of the array. so we do have not to worry about the size of the array.
very true. the reason given for why we need a linked list vs an array for the stack was not valid. During the run time also we can dynamically allocate the array size.
the main idea behind the linked list is that we can use memory not only in a contiguous fashion. for extreme sets of data, allocating continuous memory is not a great idea to go with. yes you can realloc array and add size dynamically but in the linked list the data can be stored in available memory cells during run time and the storage need not be continuous
very very good insight especially when i was confused that where the head will be define
i got resolutions thanks
Top== NULL can be top== -1
Tysm sir💜
I love Neso Academy :)
Keep up, sir
Pov:you have exam tomorrow
Please complete the playlist. Upload the video regularly sir please...
thank you man, it was an awesome explanation!
Brilliant 👌
if there was a doubly linked list we could have top as the end pointer right? since we can always go back and set it to the 2nd last pointer
First comment , I'm waiting for this video. thank u so much👍
thankyou neso love you
good one😄
You guys are truly amazing ❤️
Please upload the next video's as soon as possible sir...
i just had to comment man, kudos
But what if while pushing a node into linkedlist we keep track of both top and previous top (by another pointer variable)
And then push
This will reduce time complexity to O(1)
Data structure series complete hobe mai kitane din lag jayenge🙏
2 saal
@@suyashkumar8840 bs
7months
starts at : 4:48
الحمدالله للوجود النسو آکادمی 🤞😗
for example i want to delete the firstly created node in the list(stack operation at begining of list),it also take O(n) ...
Time complexity of inserting an element at the end
in linked list also order of N because this also traverse to insert
❤️❤️❤️
Please sir complete the playlist . I am watching the playlist for last 5 months and it's still going on.
Do not ask for the quick completion. Just leave it as it is.
how is time complexity of adding at the end of a singly linked list is constant. Isn't it O(n)?
yes you are right
because the top pointer always pointing to last node of the list
Yes it should be O(n)
Yes because in stack the top always represent the last node@@gamingwithindian8492
We are discussing stack here not simple linkedlist
do we only need to learn SINGLY LINked list for this chapter or do i need to know all like circular ,doubly etc ???
sir please upload next data structures lectures
please sir
What if we maintain pointer to second last element, the problem will be easily solved... isn't it?
Can anyone explain how time complexity of removing the last node is O(n) (at 6.06)
He is saying to get the address of 40, to make it's next as null, we need to traverse the entire LL, But can't we access it by saying top.prev
Or
We can't access as we're dealing with singly LL here
And so the time complexity will be O(n) here and O(1) in case of DLL
5:38
When the next video is coming
Have a tail pointer and make your life a bit easier?
RCB❤❤❤
But sir STACK use LIFO property and in the linked list represention first node print in first so how stack property is true in linked list represention
Thank you ❤
2:18
1:10
Write a code/ program in your each video program🙏
1 st view😁
HA HA HA HA