i am trying to insert at first, then it is not showing head->prev i want to do in that prev is not showing to implement the code. help me in this i am sending the code
Regarding double linked list
but still if we write that head-> ,it automatically shows that which node u want to link with prev or next , but in that case only head->next is showing ,head->prev is not showing in linking
Hey @ssmit_joshi
Don’t see that,its something that IDE provides(its called autocomplete) and its not 100%accurate, also its not a good practice to use autocomplete as you are training your mind to depend on it
see here of we add insert first then it is working fine ,but again if we run it then it is not inserting the element at first pls chechk
but i m initialising that in every function then wts the difference
Bro u are checking if head==NULL but u never initialized head with NULL
And some compiler will give u garbage locations instead of NULL if u don’t do that,so that’s why we have to initialize head with NULL always in the start:slight_smile:
see here i have aproblem about single linked list the code is correct but in search function if the element is not found then how we have to do that so help me in that i am sending
here in single linked if my node is empty and i do delete first operation then it is not printing node is empty pls check
Line 149
head==NULL
wt head=NULL i have already initialized !!!
Bro in if condition you should check head == NULL instead of head=NULL
can u tell me wts wrong in this program , it is of single circular linked list