Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef FOO_H_
- #define FOO_H_
- struct item;
- struct priority_queue;
- void insert(struct priority_queue *s, int key, int value);
- struct item maximum(struct priority_queue *s);
- struct item extract_maximum(struct priority_queue *s);
- void increase_key(struct priority_queue *s, struct item x, struct item k);
- #endif
- #include "priority_queue.h"
- struct item {
- int key;
- int value;
- };
- struct priority_queue {
- struct item s[100];
- };
- void insert(struct priority_queue *s, int key, int value) {
- }
- struct item maximum(struct priority_queue *s) {
- }
- struct item extract_maximum(struct priority_queue *s) {
- }
- void increase_key(struct priority_queue *s, struct item x, struct item k) {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement