Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
controle-c-003
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
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
florian.burgener
controle-c-003
Compare revisions
79c4a814e163ba9c3e384bfd64677d1a76cef7f9 to 2fd039d6f8993950a6636a1e9fc7410d482fa79c
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
florian.burgener/controle-c-003
Select target project
No results found
2fd039d6f8993950a6636a1e9fc7410d482fa79c
Select Git revision
Branches
main
1 result
Swap
Target
florian.burgener/controle-c-003
Select target project
florian.burgener/controle-c-003
1 result
79c4a814e163ba9c3e384bfd64677d1a76cef7f9
Select Git revision
Branches
main
1 result
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Validation exercice 5
· 5bc937cf
florian.burgener
authored
2 years ago
5bc937cf
Fix typo
· 2fd039d6
florian.burgener
authored
2 years ago
2fd039d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ex4/ex4.c
+1
-1
1 addition, 1 deletion
ex4/ex4.c
ex5/ex5.c
+13
-0
13 additions, 0 deletions
ex5/ex5.c
with
14 additions
and
1 deletion
ex4/ex4.c
View file @
2fd039d6
...
...
@@ -202,7 +202,7 @@ Matrix *quadtree_to_matrix(Node *root) {
// ---
/**
* @brief Clone a
Q
uadtree.
* @brief Clone a
q
uadtree.
*
* @param root
* @return Node*
...
...
This diff is collapsed.
Click to expand it.
ex5/ex5.c
View file @
2fd039d6
...
...
@@ -201,6 +201,12 @@ Matrix *quadtree_to_matrix(Node *root) {
// ---
/**
* @brief Looks for the greatest value in all the quadtree.
*
* @param root
* @return int
*/
int
quadtree_max
(
Node
*
root
)
{
if
(
quadtree_is_leaf
(
root
))
{
return
root
->
data
;
...
...
@@ -214,6 +220,13 @@ int quadtree_max(Node *root) {
return
max_value
;
}
/**
* @brief Follows the indicated path, deletes the subtree and initializes the node data to the max of the subtree.
*
* @param root
* @param indices
* @param indices_length
*/
void
transform
(
Node
*
root
,
int
*
indices
,
int
indices_length
)
{
for
(
int
i
=
0
;
i
<
indices_length
;
i
+=
1
)
{
root
=
root
->
children
[
indices
[
i
]];
...
...
This diff is collapsed.
Click to expand it.