Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TP Introduction à la sécurité L2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Romain Andres
TP Introduction à la sécurité L2
Commits
a65ec129
Commit
a65ec129
authored
3 years ago
by
Romain Andres
Browse files
Options
Downloads
Patches
Plain Diff
bloqué car je comprends r au hash key
parent
fc591658
Branches
main
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
src/bst.c
+31
-6
31 additions, 6 deletions
src/bst.c
src/bst.o
+0
-0
0 additions, 0 deletions
src/bst.o
tests/bignum_tests
+0
-0
0 additions, 0 deletions
tests/bignum_tests
tests/exemple_collision
+0
-0
0 additions, 0 deletions
tests/exemple_collision
tests/list_tests
+0
-0
0 additions, 0 deletions
tests/list_tests
with
31 additions
and
6 deletions
src/bst.c
+
31
−
6
View file @
a65ec129
...
...
@@ -18,19 +18,44 @@ typedef struct bst_t {
}
bst_t
;
bst_t
bst_empty
(
void
)
{
bst_t
t
;
t
.
size
=
0
;
t
.
tree
=
NULL
;
return
t
;
}
int
bst_is_empty
(
bst_t
t
)
{
return
t
.
size
==
0
;
}
bst_t
bst_add
(
bst_t
t
,
void
*
x
)
{
struct
node_t
*
arbre
=
t
.
tree
;
if
(
arbre
==
NULL
)
{
//Alors on va créer un arbre
struct
node_t
*
newArbre
=
malloc
(
sizeof
(
struct
node_t
));
newArbre
->
key
=
1
;
// hash(x) ?
newArbre
->
val
=
x
;
newArbre
->
right
=
NULL
;
newArbre
->
left
=
NULL
;
t
.
tree
=
newArbre
;
}
else
{
//Sinon faut aller a droite ou a gauche jusqua trouver le bon emplacement
while
(
arbre
!=
NULL
)
{
if
()
}
}
}
void
bst_destroy
(
bst_t
t
,
void
(
*
free_void
)(
void
*
))
{
}
int
bst_in
(
bst_t
t
,
void
*
x
)
{
}
unsigned
long
int
bst_size
(
bst_t
t
)
{
}
This diff is collapsed.
Click to expand it.
src/bst.o
+
0
−
0
View file @
a65ec129
No preview for this file type
This diff is collapsed.
Click to expand it.
tests/bignum_tests
+
0
−
0
View file @
a65ec129
No preview for this file type
This diff is collapsed.
Click to expand it.
tests/exemple_collision
+
0
−
0
View file @
a65ec129
No preview for this file type
This diff is collapsed.
Click to expand it.
tests/list_tests
+
0
−
0
View file @
a65ec129
No preview for this file type
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment