Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
queue
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
queue
Commits
2baac242
Commit
2baac242
authored
3 years ago
by
orestis.malaspin
Browse files
Options
Downloads
Plain Diff
Merge branch 'is_empty' into 'main'
is_empty See merge request
!1
parents
97029f97
436394d6
Branches
Branches containing commit
No related tags found
1 merge request
!1
is_empty
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
queue.c
+5
-0
5 additions, 0 deletions
queue.c
queue.h
+3
-0
3 additions, 0 deletions
queue.h
with
8 additions
and
0 deletions
queue.c
+
5
−
0
View file @
2baac242
#include
"queue.h"
#include
"queue.h"
bool
is_empty
(
queue
q
){
return
(
q
.
tail
<
0
);
}
This diff is collapsed.
Click to expand it.
queue.h
+
3
−
0
View file @
2baac242
#include
<stdbool.h>
#ifndef _QUEUE_H_
#ifndef _QUEUE_H_
#define _QUEUE_H_
#define _QUEUE_H_
...
@@ -6,4 +7,6 @@ typedef struct _queue {
...
@@ -6,4 +7,6 @@ typedef struct _queue {
int
*
data
;
int
*
data
;
}
queue
;
}
queue
;
bool
is_empty
(
queue
q
);
#endif
#endif
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