Skip to content

Instantly share code, notes, and snippets.

@ibeauregard
Last active April 24, 2021 11:20
Show Gist options
  • Save ibeauregard/34ad52471c62a0e22f7454e3475459ef to your computer and use it in GitHub Desktop.
Save ibeauregard/34ad52471c62a0e22f7454e3475459ef to your computer and use it in GitHub Desktop.
The IntStack interface
/* int_stack.h */
#include <stdbool.h>
typedef struct int_stack IntStack;
IntStack* new_stack();
void push_to_stack(IntStack* stack, int value);
int pop_stack(IntStack* stack);
int peek_stack(IntStack* stack);
bool is_empty_stack(IntStack* stack);
void delete_stack(IntStack** stack);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment