Could you please tell me how to detect these three scenarios in one remove method for an iterator? My first instinct was to check if the previous is null and then that would mean you are at the first, however Java will not let me use that as an option because I am dealing with objects.
can you please post about insertion and deletion in circular linked list? its a request please. Your methods are quite understandable and easy to learn.
out of curiosity , in the delete node procedure, is it really necessary to have two different types of loops ? One for deleting in the middle versus one for deleting at the end. It seems that only one type of loop is required. would this not work for a java implementation: @Override public boolean deleteANode(T data) { Objects.requireNonNull(data); if ( head == null ) { return false; } /** get the head pointer position first out of the way **/ if ( data.equals(head.getData())) { return deleteHeadNode(); } Node ptr = head; while ( ptr != null ){ if ( ptr.getData().equals(data)) { /** * we want to delete this node:D * a -- D -- b * D -- a -- b * a -- c -- D */ Node ptrNext = ptr.getNext(); Node ptrPrior= ptr.getPrevious(); ptrPrior.setNext(ptrNext); if ( ptrNext != null ) { /** it was the last node in the list **/ ptrNext.setPrevious(ptrPrior); } cntr--; return true; } ptr = ptr.getNext(); } return false; }
You Are Doing a Great Work, If u Explain The Time and Space Complexity of Those Algorithms at the end of Your Videos, Then that would be an added advantage, and It will be Appreciated.
For deleting a link in the middle, why can't we just use one link and use link.prev to point to the p.prev and link.next to point to p.next instead of using to pointers?
It should be While (p== "d node") because u still haven't delete anything and if u are, while(p!=delete position) should stop at "c node". But still great lecture. Will watch other vids too.
For deleting a link in the middle, why can't we just use one link and use link.prev to point to the p.prev and link.next to point to p.next instead of using to pointers?
For deleting a link in the middle, why can't we just use one link and use link.prev to point to the p.prev and link.next to point to p.next instead of using to pointers?
For deleting a link in the middle, why can't we just use one link and use link.prev to point to the p.prev and link.next to point to p.next instead of using to pointers?
thank you, you make sense more than many professors.
dude you should be my professor you are amazing at explaining
thanks sir !!! best explanation on deletion of doubly linked list
Thank you so much for your help. If it weren't for your help, I would have failed answering all of the questions regarding my double linked list.
sir u r my staff in this whole topic
thanqu so much sir tomorrow is my end sem exam n u make my concept clear about deletion in doubly linked list thanks for helping.....😊😊😊
www.mukeshrajput102.com/2017/12/write-c-programs-to-implement-double_11.html
Great job , thanks sir , i hope i will find your videos as helpful as this was
You should teach the course in my University! Excellent professor
Excellent!!! Thanks so much professor!
Thanks a lot sir!!!Your videos are really helpful!!!
thanks man ! your videos are more understandable
Thanks a lot for these explanations!! :)
Very helpful, thank you very much!
u are amazing man carry on!
thank you ....thank you so much sir......your teaching is awesom.......it was really helpful for me....
Thank you so much. It will help me a lot ❤️
Could you please tell me how to detect these three scenarios in one remove method for an iterator?
My first instinct was to check if the previous is null and then that would mean you are at the first, however Java will not let me use that as an option because I am dealing with objects.
Thank you very much sir, it is really helpful for us
6:47 Can you just declare p as the last node so that it saves time? Maybe add a tail node?
Thanx... it was really very helpful
Thanks Kashf..!
ek dum mast samjaya sir aapne
Sir, you are great 💥💥
Thank you very much, sir!
thank you so much teacher !
thanks very much best explanation i get main point rather than my lecture continue to another algorithm topics """""""""""""" KEEP IT"""""""
last movement sir u r very help ful to me. thanku soooooo much sir
Thanks Nilesh..!
Thanks a lot sir
thank you my man
can you please post about insertion and deletion in circular linked list? its a request please. Your methods are quite understandable and easy to learn.
Thanx for makig my dsa soo easy ...... could u please explain algos on circular doubly linked list
How can you compare a pointer type variable p with an integer type variable delete_position???
it was good thankyou sir easily samaj me a gya
If you can make a video of time complexity, it would be helpful. Thank You.
Yes plz😊
Thanks DUDE!
out of curiosity , in the delete node procedure, is it really necessary to have two different types of loops ? One for deleting in the middle versus one for deleting at the end. It seems that only one type of loop is required.
would this not work for a java implementation:
@Override
public boolean deleteANode(T data) {
Objects.requireNonNull(data);
if ( head == null ) {
return false;
}
/** get the head pointer position first out of the way **/
if ( data.equals(head.getData())) {
return deleteHeadNode();
}
Node ptr = head;
while ( ptr != null ){
if ( ptr.getData().equals(data)) {
/**
* we want to delete this node:D
* a -- D -- b
* D -- a -- b
* a -- c -- D
*/
Node ptrNext = ptr.getNext();
Node ptrPrior= ptr.getPrevious();
ptrPrior.setNext(ptrNext);
if ( ptrNext != null ) { /** it was the last node in the list **/
ptrNext.setPrevious(ptrPrior);
}
cntr--;
return true;
}
ptr = ptr.getNext();
}
return false;
}
please explain Insert/delete node at beginning/rear of circular singly linked list
We are really getting updated thru your help, pls sir, send me the linked list codes for single, double and circular linked list
Great video
You Are Doing a Great Work, If u Explain The Time and Space Complexity of Those Algorithms at the end of Your Videos, Then that would be an added advantage, and It will be Appreciated.
www.mukeshrajput102.com/2017/12/write-c-programs-to-implement-double_11.html
we need to delete the store_next and store_prev pointers along with p correct? I just see you deleting P. Thanks
which language is used in the program you are explaining ???
Nice teaching sir
thank you very nice
sir can you please upload the video on circular linked list insert at start , middle , and end ?
thnx a lot bro
ir can you please upload the video on circular linked list insert at start , middle , and end ?
would u please make a video on xor doubly linked list?
For deleting a link in the middle, why can't we just use one link and use link.prev to point to the p.prev and link.next to point to p.next instead of using to pointers?
what a legend
any video related with the application of Linked List
Thanks sir
which language is he using in the program ?
we need the circular linked lists too
It should be
While (p== "d node")
because u still haven't delete anything and if u are,
while(p!=delete position)
should stop at "c node". But still great lecture. Will watch other vids too.
why did we use delete p and not free?
@@priyammukherjee9725 its okay whatever you want to use. Its just a variable name. It will still work
plz make a vedio on asymptotic notation ....
Hello sir, can u please make video on circular linked list
Sir in double linked list the last node is not empty ,why u should mention it is null
Plzz give a video of circular linked list algorithm.......
I am not getting code for double linked listj
Algorithm to delete a node with given item of information in a single linked list
thank you very mush sir
i visit your website do not meet the doubly linked list code
please tell to me.thanks
I will check it Asif and update the code on the link.
Thanx sir g
do search prgrm fr doubly link list
👏 👏
Sir can you please explain data structure using java.
Thanks.
Thanks Daniel..!
Sir please update single and double circular linked list
No need of creating store pointer
can be done this way
p->next->prev = p->prev;
p->prev->next = p->next;
delete(p);
you are right but you should wrap these instructions with if then else
c program cheppagalara continuous ga
write an algorithm to delete node from doubly linked list
will soon upload..!
You are not facing audience, I just see your back 90% of time
o bahi white board sa pichay hut ka samjhaya karo
Very bad and short trick explanations that might not help you!!
For deleting a link in the middle, why can't we just use one link and use link.prev to point to the p.prev and link.next to point to p.next instead of using to pointers?
Thank you sir
For deleting a link in the middle, why can't we just use one link and use link.prev to point to the p.prev and link.next to point to p.next instead of using to pointers?
For deleting a link in the middle, why can't we just use one link and use link.prev to point to the p.prev and link.next to point to p.next instead of using to pointers?