-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpq.h
More file actions
31 lines (25 loc) · 639 Bytes
/
pq.h
File metadata and controls
31 lines (25 loc) · 639 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef _PQ_H
#define _PQ_H
/*
* File: pq.h
* Purpose: Header file for PriorityQueue using a linked list.
* Author: Kerry Veenstra
*
* -----------------------
* DO NOT MODIFY THIS FILE
* -----------------------
*/
#include "node.h"
#include <assert.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
typedef struct PriorityQueue PriorityQueue;
PriorityQueue *pq_create(void);
void pq_free(PriorityQueue **q);
bool pq_is_empty(PriorityQueue *q);
bool pq_size_is_1(PriorityQueue *q);
void enqueue(PriorityQueue *q, Node *tree);
bool dequeue(PriorityQueue *q, Node **tree);
void pq_print(PriorityQueue *q);
#endif