Question: Consider classes given below. You have write deleteSecondNode( ) method in class LinkedList this method will delete second node of linked list if any. Just write code for deleteSecondNode...



Question: Consider classes given below. You have write deleteSecondNode( ) method in class LinkedList this method will delete second node of linked list if any.



Just write code for deleteSecondNode method



class Node




{


   int data;


   Node next;



}



class LinkedList



{


  Node start=null;


  viod insert(Node n){


     n.next=start;


     start=n;


  }


void delete( ){


    if(start!=null)


      start=start.next;


}



}



Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here