|
Data Structures Lerax
1.1.0
Opinionated Data Structures & Algorithms
|
#include "../iterator/iterator.h"Go to the source code of this file.
Macros | |
| #define | STACK_STATIC_MAX 10 |
Typedefs | |
| typedef struct stack | Stack |
| A stack data structure. | |
Functions | |
| Stack * | stack_create (void) |
| Creates an empty stack. | |
| int | stack_empty (Stack *s) |
| Checks if a stack is empty. | |
| void | stack_push (Stack *s, int data) |
| Pushes an element onto the top of a stack. | |
| int | stack_pop (Stack *s) |
| Pops an element from the top of a stack. | |
| bool | stack_has (Stack *s, int data) |
| Check if element is on the stack. | |
| void | stack_print (Stack *s) |
| Prints the elements of a stack to the console. | |
| void | stack_println (Stack *s) |
| Prints the elements of a stack to the console, followed by a newline character. | |
| void | stack_free (Stack *s) |
| Frees the memory allocated for a stack. | |
| int | stack_top (Stack *s) |
| Returns the element at the top of a stack without removing it. | |
| int | stack_odds (Stack *s) |
| Counts the number of odd elements in a stack. | |
| Iterator * | stack_iterator (Stack *s) |
| Iterator of a stack structure. | |
| #define STACK_STATIC_MAX 10 |
Copyright 2017-2025 Manoel Vilela
Author: Manoel Vilela
Contact: manoel_vilela@engineer.com
Organization: UFC
| typedef struct stack Stack |
A stack data structure.