Reverse a singly Linked List
#include<bits/stdc++.h> using namespace std; struct Node { int data; struct Node *Next; }; int main() { int arr[]= {1,2,3,4,5}; struct Node *temp,*Head=NULL,*current=NULL; //insert data from array for(int i=0; i<5; i++) { temp= (struct Node *)malloc(sizeof(struct Node)); temp->data=arr[i]; temp->Next=NULL; if(Head==NULL) { Head=temp; current=temp; } else { //current=temp; current->Next=temp; current=current->Next; ...