This is my code for taking input only.
My algo checks whether the data element is already present in the linked list and if so stores the address in a node* pointer. In case the value was repeated it assigns the temp->next (i.e. the “next” of the last element of the current list) to the pointer location stored earlier and then stops taking input.
Please have a look at my code and suggest changes as I’m getting segmentation fault.
