Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 795 Bytes

README.md

File metadata and controls

27 lines (21 loc) · 795 Bytes

Overview

this repo for important data structure implementation in javascript👌

Data structure type implemented:

  • 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.