forked from rbk-org/Java_DataStructures
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLinkedList.java
More file actions
36 lines (30 loc) · 690 Bytes
/
Copy pathLinkedList.java
File metadata and controls
36 lines (30 loc) · 690 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
public class LinkedList {
public Node head;
public Node tail;
public void addToTail(int data) {
//your code is here
if(this.head==null){
this.head.value =data;
}else{
this.head.next=data;
this.tail.value=data;
}
}
public boolean contains(int value) {
//your code is here
}
public int removeHead() {
//your code is here
}
public void printList() {
//your code is here
}
public int getHead() {
//your code is here
}
public class Node {
//your code is here
int value =(Integer) null;
Object next = null;
}
}