This repository contains three algorithmic tasks implemented in C++ as part of the "Algorithms" course at the School of Electrical & Computer Engineering, National Technical University of Athens (NTUA).
Input
- Number of Supermarkets: N
- Minimum Number of Consecutive Supermarkets: K
- Availability of Packages: Cn
Output
- Maximum average value that can be achieved in a section of the main commercial road with at least k consecutive supermarket positions
Input
- Number of houses: N
- Number of houses we want to serve: K
- Number of house residents: Pi
Output
- An integer, the minimum total length of two non-overlapping consecutive residential intervals with a sum of residents equal to K. In case such intervals do not exist, the program should print -1
Input
- Number of years: N
- Maximum possible deviation from the real values: K
- N non-negative integers p1, p2, ..., pN representing the average height of the Christmas tree for each of the last N years."
Output
- Find a non-negative integer, which corresponds to the maximum length of the Longest Increasing Subsequence achievable from a modified sequence (q1, q2, ..., qN), where there exists an index range [l, r] and a value x, -K ≤ x ≤ K, such that qi = pi + x for every i ∈ [l, r], and qi = pi for every i ∉ [l, r].