-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathLLClient.java
More file actions
72 lines (62 loc) · 1.52 KB
/
LLClient.java
File metadata and controls
72 lines (62 loc) · 1.52 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package lecture9a15;
import java.util.Scanner;
public class LLClient {
static Scanner scn = new Scanner(System.in);
public static void main(String[] args) throws Exception {
// LinkedList l = new LinkedList();
// l.addLast(1);
// l.addLast(20);
//
// l.addLast(2);
// l.addLast(3);
// l.addLast(4);
// l.addLast(15);
// l.addLast(10);
//
// l.addLast(5);
// l.addLast(6);
// l.addLast(7);
// l.addLast(7);
// System.out.println(l.getFirst());
// System.out.println(l.getLast());
// System.out.println(l.getAt(3));
// l.display();
// l.reverseDI();
// l.display();
// l.reversePI();
// l.display();
// l.reverseDRHeap();
// l.display();
//// System.out.println(l.mid());
// l.delete();
// l.display();
// l.addLast(80);
// l.addLast(90);
// l.display();
// System.out.println(l.kFromEnd(4));
// l.kreverse(3);
// l.display();
// l.mergeSort();
//// l.display();
// l.llDummy();
// l.DetectRemoveloop();
// l.display();
int N = scn.nextInt();
int m = scn.nextInt();int o = scn.nextInt();
LinkedList list = new LinkedList();
for (int i = 0; i < N; i++) {
list.addLast(scn.nextInt());
}
LinkedList list1 = new LinkedList();
for (int i = 0; i < m; i++) {
list.addLast(scn.nextInt());
}
LinkedList list2 = new LinkedList();
for (int i = 0; i < o; i++) {
list.addLast(scn.nextInt());
}
int sum = scn.nextInt();
list.triplet(list1 , list2 , sum);
list.display();
}
}