//C++ program for reversing single Linked list nodes
Cpp program for implement reversing Single Linked List
Single linked list program for reversing the nodes
How to reverse linked list
#include<iostream>
using namespace std;
struct node
{
node *next;
int data;
};
class ll
{
private:
node *start;
public:
ll(){start=NULL;}
void insert(int a)
{
cout<<"Inside
Insert."<<endl;
node *newnode=new
node;
newnode->data=a;
newnode->next=start;
start=newnode;
//return;
}
void display();
void del();
void reverse();
};