-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
40 lines (34 loc) · 799 Bytes
/
index.ts
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
/**
* Linked list
*/
// import LinkedList from "./src/LinkedList";
// const list = new LinkedList();
// list.insertFirst("Hello");
// list.insertLast("Bonjour");
// list.insertAtIndex(1, "Salam");
// list.getAt(0);
// list.deleteAt(0);
// list.clear();
// console.log(list.getSize());
// console.log(list.print());
/**
* Stack
*/
// import Stack from "./src/Stack";
// const stack = new Stack(5);
// stack.push(1);
// console.log(stack.pop());
// console.log(stack.peek());
// console.log(stack.isEmpty());
// console.log(stack.print());
/**
* Queue
*/
import Queue from "./src/Queue";
const queue = new Queue(5);
// queue.enqueue(1);
// queue.dequeue();
// console.log(queue.isEmpty());
// console.log(queue.isFull());
// console.log(queue.getFront());
// console.log(queue.getRear());