## 1. Discussions based on course 5 and „Data structures” course

In this laboratory we will discuss and make exercises about:

- Data structures of simple linked list, double linked list, stack and queue types.
- Static implementation(using arrays) of stack, queue type data structures etc.
- Dynamic implementation (using linked lists) of stack, queue type data structures etc.
- etc

## 2. Exercises

- Write a C++ function that adds a value to the end of a simple linked list.
- Write a C++ function that displays the values of a simple linked list.
- Write a C++ function which determines the sum of odd elements in a simple linked list that are situated between two even elements.
- Write a C++ function that adds a value to the beginning of a simple linked list.
- Write a C++ function that deletes the first element of a simple linked list.
- Write a C++ function which determines how many pairs of coprime numbers are in a simple linked list.
- Write a C++ function which inserts a certain value before a given element from a simple linked list.
- Write a C++ function which inserts after every even element, in a simple linked list, its double.
- Write a C++ function which determines how many elements exist in a simple linked list.
- Write a C++ function which determines ho many pairs of equal consecutive numbers exist in a simple linked list.
- Write a C++ function which deletes from a simple linked list, an element positioned after a given element.
- Write a C++ function which deletes from a simple linked list, a given element.
- Write a C++ function which deletes all the even elements from a simple linked list.
- Write a C++ function which inserts a certain value after a given element from a simple linked list.
- Write a C++ function which inserts before every even number of a simple linked list, its double.
- Write a C++ function which sorts ascending the elements of a simple linked list.
- Verify if a simple linked list forms a palindrome.
- Write a program which manages a stack of integer numbers. Initially, the stack is void. The program will read a list of operations, which can be:
- push X – adds the integer value X on stack;
- pop – remove the top element of the stack;
- top – display the top element of the stack. The program will perform the operations on the stack, in order. The displays will be made on each line.