From 9c2c769da3ef99cd08d65aab349008e5e4facec2 Mon Sep 17 00:00:00 2001
From: "mathias.catala" <mathias.catala@hes-so.ch>
Date: Tue, 19 Mar 2024 09:36:55 +0100
Subject: [PATCH] "yes"

---
 .DS_Store                                     | Bin 6148 -> 6148 bytes
 {myTP => TP}/.DS_Store                        | Bin 10244 -> 10244 bytes
 {myTP => TP}/._.DS_Store                      | Bin
 {myTP => TP}/Stack_C/stack                    | Bin
 {myTP => TP}/Stack_C/stack.c                  |   0
 {myTP => TP}/Stack_dynamic_C/a.out            | Bin
 {myTP => TP}/Stack_dynamic_C/stack_dyn.c      |   0
 {myTP => TP}/TP1/app                          | Bin
 {myTP => TP}/TP1/exercice1.c                  |   0
 {myTP => TP}/TP1/exercice4.c                  |   0
 {myTP => TP}/TP1/exo4                         | Bin
 {myTP => TP}/TP10/exo1                        | Bin
 {myTP => TP}/TP10/exo1.c                      |   0
 {myTP => TP}/TP10/exo2.c                      |   0
 {myTP => TP}/TP11/.DS_Store                   | Bin
 {myTP => TP}/TP11/exo1                        | Bin
 {myTP => TP}/TP11/exo1.c                      |   0
 .../TP11/exo1.dSYM/Contents/Info.plist        |   0
 .../exo1.dSYM/Contents/Resources/DWARF/exo1   | Bin
 .../Resources/Relocations/aarch64/exo1.yml    |   0
 {myTP => TP}/TP11/exo2                        | Bin
 {myTP => TP}/TP11/exo2.c                      |   0
 .../TP11/exo2.dSYM/Contents/Info.plist        |   0
 .../exo2.dSYM/Contents/Resources/DWARF/exo2   | Bin
 .../Resources/Relocations/aarch64/exo2.yml    |   0
 {myTP => TP}/TP11/test.c                      |   0
 {myTP => TP}/TP12/.DS_Store                   | Bin
 {myTP => TP}/TP12/a.out                       | Bin
 .../TP12/a.out.dSYM/Contents/Info.plist       |   0
 .../a.out.dSYM/Contents/Resources/DWARF/a.out | Bin
 {myTP => TP}/TP12/annuary                     | Bin
 {myTP => TP}/TP12/exo1                        | Bin
 {myTP => TP}/TP12/exo1.c                      |   0
 .../TP12/exo1.dSYM/Contents/Info.plist        |   0
 .../exo1.dSYM/Contents/Resources/DWARF/exo1   | Bin
 .../Resources/Relocations/aarch64/exo1.yml    |   0
 {myTP => TP}/TP12/test.c                      |   0
 {myTP => TP}/TP13/exo1                        | Bin
 {myTP => TP}/TP13/exo1.c                      |   0
 {myTP => TP}/TP13/exo2                        | Bin
 {myTP => TP}/TP13/exo2.c                      |   0
 {myTP => TP}/TP15/Main                        | Bin
 {myTP => TP}/TP15/Makefile                    |   0
 {myTP => TP}/TP15/calculator.c                |   0
 {myTP => TP}/TP15/executable                  | Bin
 {myTP => TP}/TP15/fractions.c                 |   0
 {myTP => TP}/TP15/fractions.h                 |   0
 {myTP => TP}/TP15/test                        | Bin
 {myTP => TP}/TP15/test.c                      |   0
 TP/TP18/hash.c                                |  79 ++++++++++++++++++
 TP/TP18/hash.h                                |  39 +++++++++
 {myTP => TP}/TP2/exo1                         | Bin
 {myTP => TP}/TP2/exo1.c                       |   0
 {myTP => TP}/TP2/exo2                         | Bin
 {myTP => TP}/TP2/exo2.c                       |   0
 {myTP => TP}/TP2/exo3                         | Bin
 {myTP => TP}/TP2/exo3.c                       |   0
 {myTP => TP}/TP3/exo1                         | Bin
 {myTP => TP}/TP3/exo1.c                       |   0
 {myTP => TP}/TP4/exo1                         | Bin
 {myTP => TP}/TP4/exo1.c                       |   0
 {myTP => TP}/TP4/exo2                         | Bin
 {myTP => TP}/TP4/exo2.c                       |   0
 {myTP => TP}/TP5/exo1                         | Bin
 {myTP => TP}/TP5/exo1.c                       |   0
 {myTP => TP}/TP6/exo1                         | Bin
 {myTP => TP}/TP6/exo1.c                       |   0
 {myTP => TP}/TP7/exo1                         | Bin
 {myTP => TP}/TP7/exo1.c                       |   0
 ...ation-soir-2023-2024-public.code-workspace |   0
 {myTP => TP}/TP8/exo1                         | Bin
 {myTP => TP}/TP8/exo1.c                       |   0
 {myTP => TP}/TP8/exo2.c                       |   0
 {myTP => TP}/TP9/exo1                         | Bin
 {myTP => TP}/TP9/exo1.c                       |   0
 {myTP => TP}/TP9/exo2.c                       |   0
 {myTP => TP}/exo1                             | Bin
 {myTP => TP}/exos/dilatation                  | Bin
 {myTP => TP}/exos/dilatation.c                |   0
 {myTP => TP}/exos/exo1                        | Bin
 {myTP => TP}/exos/exo1.c                      |   0
 {myTP => TP}/read_file/my_file.txt            |   0
 {myTP => TP}/read_file/test                   | Bin
 {myTP => TP}/read_file/test.c                 |   0
 {myTP => TP}/test.c                           |   0
 85 files changed, 118 insertions(+)
 rename {myTP => TP}/.DS_Store (70%)
 rename {myTP => TP}/._.DS_Store (100%)
 rename {myTP => TP}/Stack_C/stack (100%)
 rename {myTP => TP}/Stack_C/stack.c (100%)
 rename {myTP => TP}/Stack_dynamic_C/a.out (100%)
 rename {myTP => TP}/Stack_dynamic_C/stack_dyn.c (100%)
 rename {myTP => TP}/TP1/app (100%)
 rename {myTP => TP}/TP1/exercice1.c (100%)
 rename {myTP => TP}/TP1/exercice4.c (100%)
 rename {myTP => TP}/TP1/exo4 (100%)
 rename {myTP => TP}/TP10/exo1 (100%)
 rename {myTP => TP}/TP10/exo1.c (100%)
 rename {myTP => TP}/TP10/exo2.c (100%)
 rename {myTP => TP}/TP11/.DS_Store (100%)
 rename {myTP => TP}/TP11/exo1 (100%)
 rename {myTP => TP}/TP11/exo1.c (100%)
 rename {myTP => TP}/TP11/exo1.dSYM/Contents/Info.plist (100%)
 rename {myTP => TP}/TP11/exo1.dSYM/Contents/Resources/DWARF/exo1 (100%)
 rename {myTP => TP}/TP11/exo1.dSYM/Contents/Resources/Relocations/aarch64/exo1.yml (100%)
 rename {myTP => TP}/TP11/exo2 (100%)
 rename {myTP => TP}/TP11/exo2.c (100%)
 rename {myTP => TP}/TP11/exo2.dSYM/Contents/Info.plist (100%)
 rename {myTP => TP}/TP11/exo2.dSYM/Contents/Resources/DWARF/exo2 (100%)
 rename {myTP => TP}/TP11/exo2.dSYM/Contents/Resources/Relocations/aarch64/exo2.yml (100%)
 rename {myTP => TP}/TP11/test.c (100%)
 rename {myTP => TP}/TP12/.DS_Store (100%)
 rename {myTP => TP}/TP12/a.out (100%)
 rename {myTP => TP}/TP12/a.out.dSYM/Contents/Info.plist (100%)
 rename {myTP => TP}/TP12/a.out.dSYM/Contents/Resources/DWARF/a.out (100%)
 rename {myTP => TP}/TP12/annuary (100%)
 rename {myTP => TP}/TP12/exo1 (100%)
 rename {myTP => TP}/TP12/exo1.c (100%)
 rename {myTP => TP}/TP12/exo1.dSYM/Contents/Info.plist (100%)
 rename {myTP => TP}/TP12/exo1.dSYM/Contents/Resources/DWARF/exo1 (100%)
 rename {myTP => TP}/TP12/exo1.dSYM/Contents/Resources/Relocations/aarch64/exo1.yml (100%)
 rename {myTP => TP}/TP12/test.c (100%)
 rename {myTP => TP}/TP13/exo1 (100%)
 rename {myTP => TP}/TP13/exo1.c (100%)
 rename {myTP => TP}/TP13/exo2 (100%)
 rename {myTP => TP}/TP13/exo2.c (100%)
 rename {myTP => TP}/TP15/Main (100%)
 rename {myTP => TP}/TP15/Makefile (100%)
 rename {myTP => TP}/TP15/calculator.c (100%)
 rename {myTP => TP}/TP15/executable (100%)
 rename {myTP => TP}/TP15/fractions.c (100%)
 rename {myTP => TP}/TP15/fractions.h (100%)
 rename {myTP => TP}/TP15/test (100%)
 rename {myTP => TP}/TP15/test.c (100%)
 create mode 100644 TP/TP18/hash.c
 create mode 100644 TP/TP18/hash.h
 rename {myTP => TP}/TP2/exo1 (100%)
 rename {myTP => TP}/TP2/exo1.c (100%)
 rename {myTP => TP}/TP2/exo2 (100%)
 rename {myTP => TP}/TP2/exo2.c (100%)
 rename {myTP => TP}/TP2/exo3 (100%)
 rename {myTP => TP}/TP2/exo3.c (100%)
 rename {myTP => TP}/TP3/exo1 (100%)
 rename {myTP => TP}/TP3/exo1.c (100%)
 rename {myTP => TP}/TP4/exo1 (100%)
 rename {myTP => TP}/TP4/exo1.c (100%)
 rename {myTP => TP}/TP4/exo2 (100%)
 rename {myTP => TP}/TP4/exo2.c (100%)
 rename {myTP => TP}/TP5/exo1 (100%)
 rename {myTP => TP}/TP5/exo1.c (100%)
 rename {myTP => TP}/TP6/exo1 (100%)
 rename {myTP => TP}/TP6/exo1.c (100%)
 rename {myTP => TP}/TP7/exo1 (100%)
 rename {myTP => TP}/TP7/exo1.c (100%)
 rename {myTP => TP}/TP8/algorithmique-programmation-soir-2023-2024-public.code-workspace (100%)
 rename {myTP => TP}/TP8/exo1 (100%)
 rename {myTP => TP}/TP8/exo1.c (100%)
 rename {myTP => TP}/TP8/exo2.c (100%)
 rename {myTP => TP}/TP9/exo1 (100%)
 rename {myTP => TP}/TP9/exo1.c (100%)
 rename {myTP => TP}/TP9/exo2.c (100%)
 rename {myTP => TP}/exo1 (100%)
 rename {myTP => TP}/exos/dilatation (100%)
 rename {myTP => TP}/exos/dilatation.c (100%)
 rename {myTP => TP}/exos/exo1 (100%)
 rename {myTP => TP}/exos/exo1.c (100%)
 rename {myTP => TP}/read_file/my_file.txt (100%)
 rename {myTP => TP}/read_file/test (100%)
 rename {myTP => TP}/read_file/test.c (100%)
 rename {myTP => TP}/test.c (100%)

diff --git a/.DS_Store b/.DS_Store
index c50808a229292826f092c6c5b242bd22c37b29e8..1f2672ca2ca7eae2a0f1c0aade22fda47818e7f9 100644
GIT binary patch
delta 211
zcmZoMXffEJ$`r@NGL3<OfrUYjA)O(Up(Hoo#U&{xKZ${XfrDY$)AiF19d$&NPr)l+
zkYN~{oS$3300M#no12-G8Dp1E1RIgdP{|O&5P)n&*zDC!6Jb`s<q=k3lSi>a)L^q9
M2Mfz)c8<UN0Nvj<=Kufz

delta 211
zcmZoMXffEJ$`r?GQ^~-<z`~%%kj{|FP?DSP;*yk;pTxkxz~RE7$M9+QQAbqy6uj~U
z8HT~h`MCuQAi$fjxtU3sF;?*%*oa()N`?@I0Awp_G%kMo2(tn%kFWxpJc<<}6E+KS
Mu&``q=lIJH0FWFt`2YX_

diff --git a/myTP/.DS_Store b/TP/.DS_Store
similarity index 70%
rename from myTP/.DS_Store
rename to TP/.DS_Store
index ca64d0137e4facf36131a396aab0c82bf69740bd..5f0fbbbb40b2b340fe181fe4e4dc696d90e5cbb9 100644
GIT binary patch
delta 191
zcmZn(XbG6$&*-r+U^hRb$7CLX>UvIwB8F6kM1~ZGc!o5FOokkW)SPs~;N<+=0tPT>
zUChA1fJIeqzKcszPJR*t0|Un_C;z>Z4jpyGr7{JlN?BB^3o?+cUa+}Y;0fPmc7<Oo
Jn-fKtnE^SfF$@3z

delta 36
scmZn(XbG6$&*-u-U^hRb%VZvb>doqc5BMe)EZEGh@QY>hLQ!UB0P<%H$N&HU

diff --git a/myTP/._.DS_Store b/TP/._.DS_Store
similarity index 100%
rename from myTP/._.DS_Store
rename to TP/._.DS_Store
diff --git a/myTP/Stack_C/stack b/TP/Stack_C/stack
similarity index 100%
rename from myTP/Stack_C/stack
rename to TP/Stack_C/stack
diff --git a/myTP/Stack_C/stack.c b/TP/Stack_C/stack.c
similarity index 100%
rename from myTP/Stack_C/stack.c
rename to TP/Stack_C/stack.c
diff --git a/myTP/Stack_dynamic_C/a.out b/TP/Stack_dynamic_C/a.out
similarity index 100%
rename from myTP/Stack_dynamic_C/a.out
rename to TP/Stack_dynamic_C/a.out
diff --git a/myTP/Stack_dynamic_C/stack_dyn.c b/TP/Stack_dynamic_C/stack_dyn.c
similarity index 100%
rename from myTP/Stack_dynamic_C/stack_dyn.c
rename to TP/Stack_dynamic_C/stack_dyn.c
diff --git a/myTP/TP1/app b/TP/TP1/app
similarity index 100%
rename from myTP/TP1/app
rename to TP/TP1/app
diff --git a/myTP/TP1/exercice1.c b/TP/TP1/exercice1.c
similarity index 100%
rename from myTP/TP1/exercice1.c
rename to TP/TP1/exercice1.c
diff --git a/myTP/TP1/exercice4.c b/TP/TP1/exercice4.c
similarity index 100%
rename from myTP/TP1/exercice4.c
rename to TP/TP1/exercice4.c
diff --git a/myTP/TP1/exo4 b/TP/TP1/exo4
similarity index 100%
rename from myTP/TP1/exo4
rename to TP/TP1/exo4
diff --git a/myTP/TP10/exo1 b/TP/TP10/exo1
similarity index 100%
rename from myTP/TP10/exo1
rename to TP/TP10/exo1
diff --git a/myTP/TP10/exo1.c b/TP/TP10/exo1.c
similarity index 100%
rename from myTP/TP10/exo1.c
rename to TP/TP10/exo1.c
diff --git a/myTP/TP10/exo2.c b/TP/TP10/exo2.c
similarity index 100%
rename from myTP/TP10/exo2.c
rename to TP/TP10/exo2.c
diff --git a/myTP/TP11/.DS_Store b/TP/TP11/.DS_Store
similarity index 100%
rename from myTP/TP11/.DS_Store
rename to TP/TP11/.DS_Store
diff --git a/myTP/TP11/exo1 b/TP/TP11/exo1
similarity index 100%
rename from myTP/TP11/exo1
rename to TP/TP11/exo1
diff --git a/myTP/TP11/exo1.c b/TP/TP11/exo1.c
similarity index 100%
rename from myTP/TP11/exo1.c
rename to TP/TP11/exo1.c
diff --git a/myTP/TP11/exo1.dSYM/Contents/Info.plist b/TP/TP11/exo1.dSYM/Contents/Info.plist
similarity index 100%
rename from myTP/TP11/exo1.dSYM/Contents/Info.plist
rename to TP/TP11/exo1.dSYM/Contents/Info.plist
diff --git a/myTP/TP11/exo1.dSYM/Contents/Resources/DWARF/exo1 b/TP/TP11/exo1.dSYM/Contents/Resources/DWARF/exo1
similarity index 100%
rename from myTP/TP11/exo1.dSYM/Contents/Resources/DWARF/exo1
rename to TP/TP11/exo1.dSYM/Contents/Resources/DWARF/exo1
diff --git a/myTP/TP11/exo1.dSYM/Contents/Resources/Relocations/aarch64/exo1.yml b/TP/TP11/exo1.dSYM/Contents/Resources/Relocations/aarch64/exo1.yml
similarity index 100%
rename from myTP/TP11/exo1.dSYM/Contents/Resources/Relocations/aarch64/exo1.yml
rename to TP/TP11/exo1.dSYM/Contents/Resources/Relocations/aarch64/exo1.yml
diff --git a/myTP/TP11/exo2 b/TP/TP11/exo2
similarity index 100%
rename from myTP/TP11/exo2
rename to TP/TP11/exo2
diff --git a/myTP/TP11/exo2.c b/TP/TP11/exo2.c
similarity index 100%
rename from myTP/TP11/exo2.c
rename to TP/TP11/exo2.c
diff --git a/myTP/TP11/exo2.dSYM/Contents/Info.plist b/TP/TP11/exo2.dSYM/Contents/Info.plist
similarity index 100%
rename from myTP/TP11/exo2.dSYM/Contents/Info.plist
rename to TP/TP11/exo2.dSYM/Contents/Info.plist
diff --git a/myTP/TP11/exo2.dSYM/Contents/Resources/DWARF/exo2 b/TP/TP11/exo2.dSYM/Contents/Resources/DWARF/exo2
similarity index 100%
rename from myTP/TP11/exo2.dSYM/Contents/Resources/DWARF/exo2
rename to TP/TP11/exo2.dSYM/Contents/Resources/DWARF/exo2
diff --git a/myTP/TP11/exo2.dSYM/Contents/Resources/Relocations/aarch64/exo2.yml b/TP/TP11/exo2.dSYM/Contents/Resources/Relocations/aarch64/exo2.yml
similarity index 100%
rename from myTP/TP11/exo2.dSYM/Contents/Resources/Relocations/aarch64/exo2.yml
rename to TP/TP11/exo2.dSYM/Contents/Resources/Relocations/aarch64/exo2.yml
diff --git a/myTP/TP11/test.c b/TP/TP11/test.c
similarity index 100%
rename from myTP/TP11/test.c
rename to TP/TP11/test.c
diff --git a/myTP/TP12/.DS_Store b/TP/TP12/.DS_Store
similarity index 100%
rename from myTP/TP12/.DS_Store
rename to TP/TP12/.DS_Store
diff --git a/myTP/TP12/a.out b/TP/TP12/a.out
similarity index 100%
rename from myTP/TP12/a.out
rename to TP/TP12/a.out
diff --git a/myTP/TP12/a.out.dSYM/Contents/Info.plist b/TP/TP12/a.out.dSYM/Contents/Info.plist
similarity index 100%
rename from myTP/TP12/a.out.dSYM/Contents/Info.plist
rename to TP/TP12/a.out.dSYM/Contents/Info.plist
diff --git a/myTP/TP12/a.out.dSYM/Contents/Resources/DWARF/a.out b/TP/TP12/a.out.dSYM/Contents/Resources/DWARF/a.out
similarity index 100%
rename from myTP/TP12/a.out.dSYM/Contents/Resources/DWARF/a.out
rename to TP/TP12/a.out.dSYM/Contents/Resources/DWARF/a.out
diff --git a/myTP/TP12/annuary b/TP/TP12/annuary
similarity index 100%
rename from myTP/TP12/annuary
rename to TP/TP12/annuary
diff --git a/myTP/TP12/exo1 b/TP/TP12/exo1
similarity index 100%
rename from myTP/TP12/exo1
rename to TP/TP12/exo1
diff --git a/myTP/TP12/exo1.c b/TP/TP12/exo1.c
similarity index 100%
rename from myTP/TP12/exo1.c
rename to TP/TP12/exo1.c
diff --git a/myTP/TP12/exo1.dSYM/Contents/Info.plist b/TP/TP12/exo1.dSYM/Contents/Info.plist
similarity index 100%
rename from myTP/TP12/exo1.dSYM/Contents/Info.plist
rename to TP/TP12/exo1.dSYM/Contents/Info.plist
diff --git a/myTP/TP12/exo1.dSYM/Contents/Resources/DWARF/exo1 b/TP/TP12/exo1.dSYM/Contents/Resources/DWARF/exo1
similarity index 100%
rename from myTP/TP12/exo1.dSYM/Contents/Resources/DWARF/exo1
rename to TP/TP12/exo1.dSYM/Contents/Resources/DWARF/exo1
diff --git a/myTP/TP12/exo1.dSYM/Contents/Resources/Relocations/aarch64/exo1.yml b/TP/TP12/exo1.dSYM/Contents/Resources/Relocations/aarch64/exo1.yml
similarity index 100%
rename from myTP/TP12/exo1.dSYM/Contents/Resources/Relocations/aarch64/exo1.yml
rename to TP/TP12/exo1.dSYM/Contents/Resources/Relocations/aarch64/exo1.yml
diff --git a/myTP/TP12/test.c b/TP/TP12/test.c
similarity index 100%
rename from myTP/TP12/test.c
rename to TP/TP12/test.c
diff --git a/myTP/TP13/exo1 b/TP/TP13/exo1
similarity index 100%
rename from myTP/TP13/exo1
rename to TP/TP13/exo1
diff --git a/myTP/TP13/exo1.c b/TP/TP13/exo1.c
similarity index 100%
rename from myTP/TP13/exo1.c
rename to TP/TP13/exo1.c
diff --git a/myTP/TP13/exo2 b/TP/TP13/exo2
similarity index 100%
rename from myTP/TP13/exo2
rename to TP/TP13/exo2
diff --git a/myTP/TP13/exo2.c b/TP/TP13/exo2.c
similarity index 100%
rename from myTP/TP13/exo2.c
rename to TP/TP13/exo2.c
diff --git a/myTP/TP15/Main b/TP/TP15/Main
similarity index 100%
rename from myTP/TP15/Main
rename to TP/TP15/Main
diff --git a/myTP/TP15/Makefile b/TP/TP15/Makefile
similarity index 100%
rename from myTP/TP15/Makefile
rename to TP/TP15/Makefile
diff --git a/myTP/TP15/calculator.c b/TP/TP15/calculator.c
similarity index 100%
rename from myTP/TP15/calculator.c
rename to TP/TP15/calculator.c
diff --git a/myTP/TP15/executable b/TP/TP15/executable
similarity index 100%
rename from myTP/TP15/executable
rename to TP/TP15/executable
diff --git a/myTP/TP15/fractions.c b/TP/TP15/fractions.c
similarity index 100%
rename from myTP/TP15/fractions.c
rename to TP/TP15/fractions.c
diff --git a/myTP/TP15/fractions.h b/TP/TP15/fractions.h
similarity index 100%
rename from myTP/TP15/fractions.h
rename to TP/TP15/fractions.h
diff --git a/myTP/TP15/test b/TP/TP15/test
similarity index 100%
rename from myTP/TP15/test
rename to TP/TP15/test
diff --git a/myTP/TP15/test.c b/TP/TP15/test.c
similarity index 100%
rename from myTP/TP15/test.c
rename to TP/TP15/test.c
diff --git a/TP/TP18/hash.c b/TP/TP18/hash.c
new file mode 100644
index 0000000..676d74d
--- /dev/null
+++ b/TP/TP18/hash.c
@@ -0,0 +1,79 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "hash.h"
+
+
+int hash(val,length){
+
+
+    for (int i = 0; i < strlen(c); ++i) {
+    val = (43 * val + c[i]) % length;
+                }
+    return (val % length);
+}
+
+hm_t* hm_create(int capacity){
+
+    hm_t* hash_map = (hm_t*)malloc(sizeof(hm_t));
+
+    hash_map->length = capacity;
+
+    return hash_map;
+}
+
+void hm_destroy(hm_t* hm){
+
+
+    for (int i= 0;i< hm->length;i++){
+
+        hm_t* current_entry = hm->entries[i]; 
+
+        while(current_entry != NULL){
+
+            current_entry = hm->entries[i];
+            free(current_entry);
+        }
+    }
+
+    free(hm->entries);
+
+    free(hm);
+
+}
+
+void hm_set(hm_t* hm, char* key, char* value){
+
+    
+}
+
+
+char* hm_get(hm_t* hm, char* key){
+
+    int index = hash(key,hm->length);
+
+    for (int i ?=)
+    hm_t* current_entry = hm->entries[i]; 
+    
+}
+
+
+
+
+
+
+
+int main (){
+
+    int capacity = 100; // Capacité de la table de hachage
+    
+    // Création d'une nouvelle table de hachage
+    hm_t* hash_map = hm_create(capacity);
+
+    // Utilisation de la table de hachage...
+
+    // Libération de la mémoire allouée pour la table de hachage lorsque vous avez terminé
+    free(hash_map);
+
+    return 0;
+
+}
\ No newline at end of file
diff --git a/TP/TP18/hash.h b/TP/TP18/hash.h
new file mode 100644
index 0000000..da1709a
--- /dev/null
+++ b/TP/TP18/hash.h
@@ -0,0 +1,39 @@
+
+typedef struct {
+    struct entry_t **entries;
+    int length;
+} hm_t;
+
+typedef struct entry_t {
+    char *key;
+    char *value;
+    struct entry_t *next;
+}entry_t;
+
+// création d'un pointeur vers une hm
+hm_t* hm_create(int capacity);
+// destruction de la hm et libération de la mémoire
+void hm_destroy(hm_t* hm);
+// insère la paire key-value dans la hm. si key est déjà présente
+// écraser value dans la hm. La clé et la valeur sont stockées
+// dans de nouveau espaces mémoires alloués par la fonction
+
+void hm_set(hm_t* hm, char* key, char* value);
+// retourne la valeur associé à la clé, key
+// dans un espace mémoire alloué à strcet effet
+char* hm_get_alloc(hm_t* hm, char* key);
+// retourne la valeur associé à la clé, key
+// retourne le pointeur dans la structure hm_t
+char* hm_get(hm_t* hm, char* key);
+// retire une clé de la hm
+void hm_rm(hm_t* hm, char* key);
+// teste si une clé se trouve dans la hm
+bool hm_is_present(hm_t* hm, char* key);
+// affiche le contenu de la hm
+void hm_print(hm_t* hm);
+// sauvegarde les pairs clé-valeur contenues de la table de hachage dans un fichier texte
+// au format <key>;<value>
+void hm_save(hm_t *hm, char *filename);
+// charge les pairs clé-valeur dans une table de hachage depuis les
+// lignes d'un fichier texte dont le format est <key>;<value>
+hm_t *hm_load(char *filename);
\ No newline at end of file
diff --git a/myTP/TP2/exo1 b/TP/TP2/exo1
similarity index 100%
rename from myTP/TP2/exo1
rename to TP/TP2/exo1
diff --git a/myTP/TP2/exo1.c b/TP/TP2/exo1.c
similarity index 100%
rename from myTP/TP2/exo1.c
rename to TP/TP2/exo1.c
diff --git a/myTP/TP2/exo2 b/TP/TP2/exo2
similarity index 100%
rename from myTP/TP2/exo2
rename to TP/TP2/exo2
diff --git a/myTP/TP2/exo2.c b/TP/TP2/exo2.c
similarity index 100%
rename from myTP/TP2/exo2.c
rename to TP/TP2/exo2.c
diff --git a/myTP/TP2/exo3 b/TP/TP2/exo3
similarity index 100%
rename from myTP/TP2/exo3
rename to TP/TP2/exo3
diff --git a/myTP/TP2/exo3.c b/TP/TP2/exo3.c
similarity index 100%
rename from myTP/TP2/exo3.c
rename to TP/TP2/exo3.c
diff --git a/myTP/TP3/exo1 b/TP/TP3/exo1
similarity index 100%
rename from myTP/TP3/exo1
rename to TP/TP3/exo1
diff --git a/myTP/TP3/exo1.c b/TP/TP3/exo1.c
similarity index 100%
rename from myTP/TP3/exo1.c
rename to TP/TP3/exo1.c
diff --git a/myTP/TP4/exo1 b/TP/TP4/exo1
similarity index 100%
rename from myTP/TP4/exo1
rename to TP/TP4/exo1
diff --git a/myTP/TP4/exo1.c b/TP/TP4/exo1.c
similarity index 100%
rename from myTP/TP4/exo1.c
rename to TP/TP4/exo1.c
diff --git a/myTP/TP4/exo2 b/TP/TP4/exo2
similarity index 100%
rename from myTP/TP4/exo2
rename to TP/TP4/exo2
diff --git a/myTP/TP4/exo2.c b/TP/TP4/exo2.c
similarity index 100%
rename from myTP/TP4/exo2.c
rename to TP/TP4/exo2.c
diff --git a/myTP/TP5/exo1 b/TP/TP5/exo1
similarity index 100%
rename from myTP/TP5/exo1
rename to TP/TP5/exo1
diff --git a/myTP/TP5/exo1.c b/TP/TP5/exo1.c
similarity index 100%
rename from myTP/TP5/exo1.c
rename to TP/TP5/exo1.c
diff --git a/myTP/TP6/exo1 b/TP/TP6/exo1
similarity index 100%
rename from myTP/TP6/exo1
rename to TP/TP6/exo1
diff --git a/myTP/TP6/exo1.c b/TP/TP6/exo1.c
similarity index 100%
rename from myTP/TP6/exo1.c
rename to TP/TP6/exo1.c
diff --git a/myTP/TP7/exo1 b/TP/TP7/exo1
similarity index 100%
rename from myTP/TP7/exo1
rename to TP/TP7/exo1
diff --git a/myTP/TP7/exo1.c b/TP/TP7/exo1.c
similarity index 100%
rename from myTP/TP7/exo1.c
rename to TP/TP7/exo1.c
diff --git a/myTP/TP8/algorithmique-programmation-soir-2023-2024-public.code-workspace b/TP/TP8/algorithmique-programmation-soir-2023-2024-public.code-workspace
similarity index 100%
rename from myTP/TP8/algorithmique-programmation-soir-2023-2024-public.code-workspace
rename to TP/TP8/algorithmique-programmation-soir-2023-2024-public.code-workspace
diff --git a/myTP/TP8/exo1 b/TP/TP8/exo1
similarity index 100%
rename from myTP/TP8/exo1
rename to TP/TP8/exo1
diff --git a/myTP/TP8/exo1.c b/TP/TP8/exo1.c
similarity index 100%
rename from myTP/TP8/exo1.c
rename to TP/TP8/exo1.c
diff --git a/myTP/TP8/exo2.c b/TP/TP8/exo2.c
similarity index 100%
rename from myTP/TP8/exo2.c
rename to TP/TP8/exo2.c
diff --git a/myTP/TP9/exo1 b/TP/TP9/exo1
similarity index 100%
rename from myTP/TP9/exo1
rename to TP/TP9/exo1
diff --git a/myTP/TP9/exo1.c b/TP/TP9/exo1.c
similarity index 100%
rename from myTP/TP9/exo1.c
rename to TP/TP9/exo1.c
diff --git a/myTP/TP9/exo2.c b/TP/TP9/exo2.c
similarity index 100%
rename from myTP/TP9/exo2.c
rename to TP/TP9/exo2.c
diff --git a/myTP/exo1 b/TP/exo1
similarity index 100%
rename from myTP/exo1
rename to TP/exo1
diff --git a/myTP/exos/dilatation b/TP/exos/dilatation
similarity index 100%
rename from myTP/exos/dilatation
rename to TP/exos/dilatation
diff --git a/myTP/exos/dilatation.c b/TP/exos/dilatation.c
similarity index 100%
rename from myTP/exos/dilatation.c
rename to TP/exos/dilatation.c
diff --git a/myTP/exos/exo1 b/TP/exos/exo1
similarity index 100%
rename from myTP/exos/exo1
rename to TP/exos/exo1
diff --git a/myTP/exos/exo1.c b/TP/exos/exo1.c
similarity index 100%
rename from myTP/exos/exo1.c
rename to TP/exos/exo1.c
diff --git a/myTP/read_file/my_file.txt b/TP/read_file/my_file.txt
similarity index 100%
rename from myTP/read_file/my_file.txt
rename to TP/read_file/my_file.txt
diff --git a/myTP/read_file/test b/TP/read_file/test
similarity index 100%
rename from myTP/read_file/test
rename to TP/read_file/test
diff --git a/myTP/read_file/test.c b/TP/read_file/test.c
similarity index 100%
rename from myTP/read_file/test.c
rename to TP/read_file/test.c
diff --git a/myTP/test.c b/TP/test.c
similarity index 100%
rename from myTP/test.c
rename to TP/test.c
-- 
GitLab