#ifndef _STACK_H
#define _STACK_H

#include "graph.h"
#include <stddef.h>
#include <stdlib.h>

typedef struct {
    size_t size;
    size_t alloc_size;
    size_t* data;
} stack;

stack* new_stack(void);
void free_stack(stack* S);
void push_stack(stack* S, size_t elem);
int is_empty_stack(stack* S);
int pop_stack(stack* S, size_t* elem);
void empty_stack(stack* S);

// NOTE: these are O(n) operations as they need to loop through all elements
// of the stack
void remove_from_stack(stack* S, size_t elem);
void bulk_remove_from_stack(stack* S, const size_t* ToRemove);
int contains_stack(stack* S, size_t elem);

#endif
