Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stack
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
Show more breadcrumbs
algorithmique
lib_2021_malaspinas
stack
Commits
cf9ddf4c
Commit
cf9ddf4c
authored
3 years ago
by
orestis.malaspin
Browse files
Options
Downloads
Plain Diff
Merge branch '8-add-get-length-function' into 'main'
"Add get length function" Closes
#8
See merge request
!15
parents
1dec4649
9d7603c5
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!15
"Add get length function"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+0
-1
0 additions, 1 deletion
README.md
stack.c
+5
-0
5 additions, 0 deletions
stack.c
stack.h
+1
-0
1 addition, 0 deletions
stack.h
with
6 additions
and
1 deletion
README.md
+
0
−
1
View file @
cf9ddf4c
# stack
This diff is collapsed.
Click to expand it.
stack.c
+
5
−
0
View file @
cf9ddf4c
...
...
@@ -40,3 +40,8 @@ void stack_clone(stack s, stack *clone) {
}
}
int
get_length
(
stack
s
)
{
return
s
->
top
+
1
;
}
This diff is collapsed.
Click to expand it.
stack.h
+
1
−
0
View file @
cf9ddf4c
...
...
@@ -11,6 +11,7 @@ void stack_init(stack *stack);
void
stack_peek
(
stack
s
,
int
*
value
);
void
stack_clone
(
stack
s
,
stack
*
clone
);
int
get_length
(
stack
s
);
void
stack_print
(
const
stack
s
);
...
...
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