Skip to the content.

Back to main page

Stacks & Queues

Stacks

1- FILO : first in last out

2-LIFO : last in first out

1- push

2- pop

3- Peek

4-top

5-isEmpty

how a stack looks like ? characteristic

the Big O for all of these termonolgys is

Big O(1)

## Queues

A Queue is Linear Data Structure where data elements are arranged sequentially in an array.

1- FIFO:First In First Out .

2- LILO : Last In Last Out.

1- Enqueue

2- Dequeue

3- Front

4-Rear

5-isEmpty

6- Peek

how a Queue looks like ?

characteristic

the Big O for all of these termonolgys is

Big O(1)