This repo contains all algorithms I'm learning and practising.
Data Types | Built-in | User defined 1 | USer defined 2 |
---|---|---|---|
Integer | List | Stack | Queue |
String | Tuple | Queue | - |
Boolean | Set | Linked List | - |
Float | Dictionary | Tree | - |
- Real world example : Plate washing and using
- LIFO - Last in First Out
- push and pop
- Used in undo and redo operations
- Refer the python script on GitHub.
- Real world examples : Standing in a que.
- FIFO - First in First Out
- Adding elements is called enqueue.
- Removing elements is called dequeue.
- Used in linear operations
- Uploading images
- Printing documents
- Refer the python script on GitHub.
- Real world examples : queue in a hospital.
- Highest value low priority or Highest value high priority.
- First sort the list then proceed.
- Real work example : Treasure hunt game, relay running.
- Dynamic
- It is used to implement stack, queue and graphs.
- Requires more memory.
- Cannot be accessed randomly.
- Singly linked list
- Double linked list
- Circular linked list
- Each node has single reference of another node.