|
DSA Hacking Club Library
|
Representation of a stack of integers. More...
#include <stack.h>
Public Attributes | |
| int * | data |
| Pointer to the dynamically allocated array of integers. | |
| int | top |
| Index of the current top element (-1 if empty) | |
| int | capacity |
| Maximum number of elements the stack can hold. | |
Representation of a stack of integers.
The Stack struct encapsulates an array of integers allocated on the heap, an index for the top element, and the maximum capacity.