232
This commit is contained in:
36
include/solution/232.h
Normal file
36
include/solution/232.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef INC_232_H
|
||||
#define INC_232_H
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int *base;
|
||||
int ptr;
|
||||
int size;
|
||||
} stack;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
stack *s1;
|
||||
stack *s2;
|
||||
} MyQueue;
|
||||
|
||||
MyQueue *myQueueCreate();
|
||||
|
||||
void myQueuePush(MyQueue *obj, int x);
|
||||
|
||||
int myQueuePop(MyQueue *obj);
|
||||
|
||||
int myQueuePeek(MyQueue *obj);
|
||||
|
||||
bool myQueueEmpty(MyQueue *obj);
|
||||
|
||||
void myQueueFree(MyQueue *obj);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user