this repo for important data structure implementation in javascript👌
-
Stack
- Push() add new item to storage.
- pop() delete last item.
- length() return size of storage.
- peak() return first item.
- swap() swap first two items.
- print() return items.
- search() return index of target item.
- isEmpty() return Boolean to check if stack empty or not.
-
Queue
- enqueue() add new item to storage.
- dequeue() delete last item.
- length() return size of storage.
- first() return first item.
- last() return last item.
- print() return items.
- search() return index of target item.
- isEmpty() return Boolean to check if queue empty or not.