-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutility.h
39 lines (33 loc) · 827 Bytes
/
utility.h
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
32
33
34
35
36
37
38
39
#ifndef UTILITY_H
#define UTILITY_H
#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
typedef struct bNode{
int data;
struct bNode *left;
struct bNode *right;
struct bNode *nextParent;
}bNode;
typedef struct bRootNode{
int data;
bNode *left;
bNode *right;
int level;
int col;
struct bNode* lastParent;
}bRootNode;
typedef struct popHeapResult{
int data;
uint8_t result;
}popHeapResult;
/***********************************************/
/* Function prototypes */
/***********************************************/
bNode* CreatebNode(int data);
bRootNode* CreatebRootNode(int data);
bool MaxMin(int a, int b, bool returnMax);
bool MaxMinEqual(int a, int b, bool returnMax);
void destroybTree(bNode *root);
int power(int base, int exponent);
#endif