DSA Hacking Club Library
Loading...
Searching...
No Matches
Stack Struct Reference

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.

Detailed Description

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.


The documentation for this struct was generated from the following file: