You are given the following Node class:
1 class Nodel
2 String data;
3
Node next;
4
5 Node(String data) {
6
this data = data;
7
next = null;
8
>
Write a class called MyLinkedlist that implements a linked list using the objects of the class Node.
It should have the following methods.
• insert : takes as parameter an integer and a string. The integer denotes the position where the new no
us the value of the new node
delete: takes as parameter an integer. The integer denotes the position of the node to be deleted
print: prints all the elements of the linked list on a single line
Answers
Answered by
0
Answer:
ruuggsdhijbfsdhnionbgdsth
Similar questions
Computer Science,
2 months ago
Chemistry,
2 months ago
Math,
11 months ago
Science,
11 months ago
English,
11 months ago