Tasks completed at level 3 problem-solving training with ICPC Damanhour community (3 Jan 2024)
All implementations should work with differrent data types
Write an implementation of double linked list that have the following operation:
- Add an element in the front of the linked list
- Add an element in the back of the linked list
- Add an element in a given index in the linked list
- Delete the element at the front of the linked list
- Delete the element at the back of the linked list
- Delete an element at a given index
- Get an element in a given index
- Reverse the Linked list
- Check if list is empty
- Get list size
Write an implementation of a stack using an array (array should not have fixed size) and have the following operations:
- Push element at the top of the stack
- Get the value of the top element of the stack
- Remove the element at the top of the stack
- Check if stack is empty
- Get stack size
Write an implementation of a stack using linked list and have the following operations:
- Push element at the top of the stack
- Get the value of the top element of the stack
- Remove the element at the top of the stack
- Check if stack is empty
- Get stack size
Write an implementation of a circular queue using an array of fixed size 20 and have the following operations:
- Push element at the back of the queue
- Get the value of the front element of the queue
- Remove the element at the top of the queue
- Check if queue is empty
- Get queue size
Write an implementation of a queue using linked list and have the following operations:
- Push element at the back of the queue
- Get the value of the front element of the queue
- Remove the element at the top of the queue
- Check if queue is empty
- Get queue size
Wite an implementation of the pop_back function in vector and prove its amortized complexity using potential function.
read:- Potential function article