Skip to content

BorkedFork/cst211-data-structures-stack-linked

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CST211 - Data Structures: Stack (Linked List-Based)

Overview

Linked list-based stack implementation providing dynamic memory allocation without fixed capacity limits.

Course Information

  • Course: CST211 - Data Structures
  • Assignment: Assignment 6 - Stack Linked List
  • Institution: Oregon Institute of Technology

Features

  • LIFO stack using linked nodes
  • No fixed capacity constraints
  • Dynamic memory allocation per element
  • Built on LinkedList foundation
  • Efficient memory usage for variable-size stacks

Technical Details

Stack Class

  • Base Structure: Built on top of LinkedList class
  • Memory: Dynamic allocation, grows/shrinks as needed
  • Efficiency: O(1) for all operations, no resizing overhead

Key Operations

  • Push(T) - Add element to top (front of list)
  • Pop() - Remove and return top element
  • Peek() - View top element
  • isEmpty() - Check if stack is empty
  • Size() - Get element count

Comparison with Array-Based Stack

  • Pros: No capacity limits, no wasted space
  • Cons: Slight overhead per node, less cache-friendly

Learning Objectives

  • Alternative stack implementations
  • Trade-offs between array and linked list backing
  • Adapter pattern with different base structures
  • Memory allocation strategies

Technologies

  • C++
  • Visual Studio
  • Linked data structures

About

LIFO stack with linked list implementation - CST211 Data Structures

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages