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;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here