Generation

generate functionMon, 07 Nov 2022

Implement linkedlist

public class mylinkedlist { Node head; public static void main(String args[]) { mylinkedlist list = new mylinkedlist(); list.head = new Node(1); Node second = new Node(2); Node third = new Node(3); list.head.next = second; second.next = third; } } class Node { int data; Node next; Node(int d) { data = d; next = null; } }

Want to kickstart your project?Use the new AI Studio to create your code