Hello everyone
I am working on a link list in c .My goal is to add elements into a single link list to the end. If the element already exist in the link list, it prints out "element present" otherwise adds the element.
I am new to programming, so I am just working on the logic, however I have not been able to implement it.
Logic:
create a ptr node.
check if( start==NULL)
if (yes)
node->info=data
else if(start!=NULL)
check ptr->next==NULL and ptr->info!=data
if (yes)
add the new node here
else
ptr=ptr->next
I am so confused.