all_operation_on_singly_linked_list
// all basic operation retleted to singly linked list #include <bits/stdc++.h> using namespace std ; class node { public: int data; node * next; node ( int val ){ data = val ; next = NULL ; } }; void insertAtTail ( node * & head , int val ){ node * n = new node ( val ); node * temp = head ; if ( head == NULL ){ head = n; return ; } while (temp->next != NULL ){ temp = temp->next; } temp->next = n; } void display ( node * head ){ node * temp = head ; while (temp != NULL ){ cout << temp->data << "->" ; temp = temp->next; } cout << "NULL" << endl ; } void insertAtHead ( node * & head , int val ){ node * n = new node ( val ); node * temp = head ; if (temp == NULL ){ head = n; return ; } n->next = head ; head = n; } void insertAtAnyw