Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ISC_144 - B+ Tree Project
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
ISC_144 - B+ Tree Project
Commits
c6614738
Commit
c6614738
authored
2 years ago
by
Florian Burgener
Browse files
Options
Downloads
Patches
Plain Diff
Linked list for leaf nodes
parent
ddc56daa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/bptree.c
+6
-1
6 additions, 1 deletion
src/bptree.c
src/main.c
+1
-0
1 addition, 0 deletions
src/main.c
with
7 additions
and
1 deletion
src/bptree.c
+
6
−
1
View file @
c6614738
...
...
@@ -154,7 +154,12 @@ static uint64_t split_leaf(BPTreeNode *node, uint64_t key, uint64_t data, BPTree
IntegerArray_insert_at_index
((
*
right_node
)
->
data
,
insertion_index
,
data
);
}
// TODO : Linked List
if
(
node
->
children
->
size
==
0
)
{
BPTreeNodeArray_append
(
node
->
children
,
*
right_node
);
}
else
{
BPTreeNodeArray_append
((
*
right_node
)
->
children
,
node
->
children
->
items
[
0
]);
node
->
children
->
items
[
0
]
=
*
right_node
;
}
return
median_value
;
}
...
...
This diff is collapsed.
Click to expand it.
src/main.c
+
1
−
0
View file @
c6614738
...
...
@@ -50,6 +50,7 @@ void append_record(Directory *directory) {
void
search_record
(
Directory
*
directory
)
{
printf
(
"Enter the phone number that corresponds to the record you are looking for: "
);
// TODO : crash phone number overflow
char
phone_number
[
11
];
scanf
(
"%s"
,
phone_number
);
clear_buffer
();
...
...
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