Abstract Data Type (ADTs)
Abstract data types, are a way of classifying data structures based on how they are used and the behaviors they provide. They do not specify how the data structure must be implemented but simply provide a minimal expected interface and set of behaviors.
ADTs are a theoretical concept in computer science, used in the design and analysis of algorithms, data structures and software systems, and do not correspond to specific features of computer languages.
Why ADTs?
To manage the complexity of problems and the problem-solving process, abstraction are used to allow the user to focus on the big picture without getting lost in the details.

— List ADT
We all know intuitively what a list is. In our everyday lives , we use lists all the time grocery lists, lists of assignments, lists of e-mail addresses and so on.
In programming would describe a list to you as a collection of elements that have a linear relationship with each other.
- items in list have a position(index).
- lists have a size
- lists can grow and shrink
- lists don’t have any gap.
following methods can be use for list.

— Stack ADT
A Stack is a LIFO (Last In First Out) data structure.In stack elements can be inserted and deleted from one side of the list ,called top.
The insertion of an element is called pushing and deletion of an element from the stack is called popping. In stacks ,the last element in a list is tracked with a pointer called top.

following methods can be use for stack
- Object push(Object element) :Pushes an element on the top of the stack.
- Object pop() :Removes and returns the top element of the stack. An ‘EmptyStackException’ exception is thrown if we call pop() when the invoking stack is empty.
- Object peek() :Returns the element on the top of the stack, but does not remove it.
- boolean empty() :It returns true if nothing is on the top of the stack. Else, returns false.
- int search(Object element) :It determines whether an object exists in the stack. If the element is found, it returns the position of the element from the top of the stack. Else, it returns -1.
— Queue ADT
A queue is a FIFO(First in first out) data structure. The first element that is placed in a queue is the first out.

Elements can be inserted only from one side of the list called rear. and the elements can be deleted only from the other side called front. The insertion of an element in a queue is called an enqueue operation and deleting a element is called a dequeue operation.

The queue operations are given below.
- Queue() : Creates a new queue that is empty. It needs no parameters and returns an empty queue.
- enqueue(item): Adds a new item to the rear of the queue. It needs the item and returns nothing.
3. dequeue() : Removes the front item from the queue. It needs no parameters and returns the item. The queue is modified.
4. isEmpty() :Tests to see whether the queue is empty. It needs no parameters and returns a boolean value.
5. size() : Returns the number of items in the queue. It needs no parameters and returns an integer.
