Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scrabble-etu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CHABAKA ALI IBRAHIM REDA MAH p2200473
scrabble-etu
Commits
322700c8
Commit
322700c8
authored
2 weeks ago
by
CHABAKA ALI IBRAHIM REDA MAH p2200473
Browse files
Options
Downloads
Patches
Plain Diff
fichier gadag et node
parent
6928bb76
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/gadag.cpp
+9
-0
9 additions, 0 deletions
src/gadag.cpp
src/gadag.hpp
+6
-10
6 additions, 10 deletions
src/gadag.hpp
src/node .cpp
+3
-0
3 additions, 0 deletions
src/node .cpp
src/node.hpp
+17
-0
17 additions, 0 deletions
src/node.hpp
with
35 additions
and
10 deletions
src/gadag.cpp
+
9
−
0
View file @
322700c8
#include
"gadag.hpp"
gaddag
::
gaddag
()
{
root
=
new
Node
();
}
~
Gaddag
::
gaddag
()
{
clear
(
root
);
//supprimer tous le gadag
}
This diff is collapsed.
Click to expand it.
src/gadag.hpp
+
6
−
10
View file @
322700c8
#ifndef
GADDAG
_H
#define
GADDAG
_H
#ifndef
gaddag
_H
#define
gaddag
_H
#include
<map>
#include
<string>
#include
"node.hpp"
using
namespace
std
;
struct
Node
{
bool
isTerminal
;
// Indique si le nœud est terminal
map
<
char
,
Node
*>
children
;
// Enfants du nœud
Node
();
};
struct
G
addag
{
struct
g
addag
{
Node
*
root
;
G
addag
();
~
G
addag
();
g
addag
();
~
g
addag
();
void
insert
(
string
word
);
bool
search
(
string
word
);
void
clear
(
Node
*
node
);
...
...
This diff is collapsed.
Click to expand it.
src/node .cpp
0 → 100755
+
3
−
0
View file @
322700c8
node
::
node
(){
isTerminal
=
false
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/node.hpp
0 → 100755
+
17
−
0
View file @
322700c8
ifndef
Node_H
#define Node_H
#include
<map>
#include
<string>
struct
Node
{
bool
isTerminal
;
// Indique si le nœud est terminal
map
<
char
,
Node
*>
children
;
// Enfants du nœud
Node
();
};
#endif
\ No newline at end of file
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