178 lines
2.6 KiB
Markdown
178 lines
2.6 KiB
Markdown
|
# Examen 2025
|
||
|
|
||
|
---
|
||
|
_**201.1 Algorithmes et Structures de données**_
|
||
|
|
||
|

|
||
|
|
||
|
Voici mes réponses pour l'examen 2025 d'_Algorithmes et Structures de données_ ainsi que les tests unitaires fournis.
|
||
|
|
||
|
## Exercice 1
|
||
|
|
||
|
<table>
|
||
|
<tr>
|
||
|
<td><strong>But</strong></td>
|
||
|
<td>...</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><strong>Input</strong></td>
|
||
|
<td>...</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><strong>Output</strong></td>
|
||
|
<td>...</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><strong>Signature</strong></td>
|
||
|
<td>
|
||
|
|
||
|
```python
|
||
|
def function1(
|
||
|
*args
|
||
|
) -> Any:
|
||
|
```
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
[Source](https://git.kb28.ch/HEL/AlgoDS-Examen2025/src/branch/main/src/ex1_.py)
|
||
|
/
|
||
|
[Tests](https://git.kb28.ch/HEL/AlgoDS-Examen2025/src/branch/main/tests/test_ex1.py)
|
||
|
|
||
|
|
||
|
## Exercice 2
|
||
|
|
||
|
<table>
|
||
|
<tr>
|
||
|
<td><strong>But</strong></td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><strong>Input</strong></td>
|
||
|
<td>...</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><strong>Output</strong></td>
|
||
|
<td>...</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><strong>Signature</strong></td>
|
||
|
<td>
|
||
|
|
||
|
```python
|
||
|
def function2(
|
||
|
*args
|
||
|
) -> Any:
|
||
|
```
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
[Source](https://git.kb28.ch/HEL/AlgoDS-Examen2025/src/branch/main/src/ex2_.py)
|
||
|
/
|
||
|
[Tests](https://git.kb28.ch/HEL/AlgoDS-Examen2025/src/branch/main/tests/test_ex2.py)
|
||
|
|
||
|
|
||
|
## Exercice 3
|
||
|
|
||
|
<table>
|
||
|
<tr>
|
||
|
<td><strong>But</strong></td>
|
||
|
<td>...</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><strong>Input</strong></td>
|
||
|
<td>...</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><strong>Output</strong></td>
|
||
|
<td>...</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><strong>Signature</strong></td>
|
||
|
<td>
|
||
|
|
||
|
```python
|
||
|
def function3(
|
||
|
*args
|
||
|
) -> Any:
|
||
|
```
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
[Source](https://git.kb28.ch/HEL/AlgoDS-Examen2025/src/branch/main/src/ex3_.py)
|
||
|
/
|
||
|
[Tests](https://git.kb28.ch/HEL/AlgoDS-Examen2025/src/branch/main/tests/test_ex3.py)
|
||
|
|
||
|
|
||
|
## Exercice 4
|
||
|
|
||
|
<table>
|
||
|
<tr>
|
||
|
<td><strong>But</strong></td>
|
||
|
<td>...</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><strong>Input</strong></td>
|
||
|
<td>...</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><strong>Output</strong></td>
|
||
|
<td>...</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><strong>Signature</strong></td>
|
||
|
<td>
|
||
|
|
||
|
```python
|
||
|
def function4(
|
||
|
*args
|
||
|
) -> Any:
|
||
|
```
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
[Source](https://git.kb28.ch/HEL/AlgoDS-Examen2025/src/branch/main/src/ex4_.py)
|
||
|
/
|
||
|
[Tests](https://git.kb28.ch/HEL/AlgoDS-Examen2025/src/branch/main/tests/test_ex4.py)
|
||
|
|
||
|
|
||
|
## Exercice 5
|
||
|
|
||
|
<table>
|
||
|
<tr>
|
||
|
<td><strong>But</strong></td>
|
||
|
<td>...</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><strong>Input</strong></td>
|
||
|
<td>...</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><strong>Output</strong></td>
|
||
|
<td>...</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><strong>Signature</strong></td>
|
||
|
<td>
|
||
|
|
||
|
```python
|
||
|
def function5(
|
||
|
*args
|
||
|
) -> Any:
|
||
|
```
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
[Source](https://git.kb28.ch/HEL/AlgoDS-Examen2025/src/branch/main/src/ex5_.py)
|
||
|
/
|
||
|
[Tests](https://git.kb28.ch/HEL/AlgoDS-Examen2025/src/branch/main/tests/test_ex5.py)
|