Skip to content

BorkedFork/cst211-data-structures-stack-array

Repository files navigation

CST211 - Data Structures: Stack (Array-Based)

Overview

Array-based stack implementation demonstrating LIFO (Last-In-First-Out) behavior with dynamic resizing.

Course Information

  • Course: CST211 - Data Structures
  • Assignment: Assignment 5 - Stack Array
  • Institution: Oregon Institute of Technology

Features

  • LIFO stack operations
  • Array-based implementation using template Array class
  • Dynamic capacity management
  • Exception handling for underflow/overflow
  • Constant-time push and pop operations

Technical Details

Stack Class

  • Base Structure: Built on top of custom Array class
  • Operations: Push, Pop, Peek
  • Efficiency: O(1) for all operations (amortized for push with resize)

Key Operations

  • Push(T) - Add element to top of stack
  • Pop() - Remove and return top element
  • Peek() - View top element without removal
  • isEmpty() - Check if stack is empty
  • Size() - Get number of elements

Learning Objectives

  • LIFO data structure implementation
  • Adapter pattern (using Array as underlying storage)
  • Stack applications and use cases
  • Performance analysis of array-based stacks

Technologies

  • C++
  • Visual Studio
  • Template programming

About

LIFO stack with array-based implementation - CST211 Data Structures

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages