This repository consists of the code samples, assignments, and notes for the Java data structures & algorithms + interview preparation bootcamp of WeMakeDevs.
if(head==tail){ // indicates single element in the circular linked list
if(head.val == val){ // check wether it contains the element that need to be deleted
head=null;
tail=null;
}
return;
}
if(head==tail){ // indicates single element in the circular linked list if(head.val == val){ // check wether it contains the element that need to be deleted head=null; tail=null; } return;
}