Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⬢ Hexagonal Priority Queue Simulator

The application simulates a collection of hexagonal priority queues, where each queue stores up to six Binary Search Trees (BSTs). During the simulation, trees are removed according to predefined priority rules and redistributed to neighboring hexagons, allowing the entire system to evolve over multiple rounds.

All data structures were implemented from scratch without using the C++ Standard Template Library (STL).


🛠 Technologies

  • C++
  • MinGW
  • Makefile

✨ Features

  • Binary Search Tree (BST) implementation
  • Hexagonal priority queue simulation
  • Circular linked list implementation
  • Queue and stack implemented from scratch
  • Dynamic tree redistribution between hexagons
  • File-based initialization
  • Real-time console visualization
  • Round-based simulation

🧠 Data Structure Architecture

Circular Linked List
        │
        ▼
 Hexagonal Priority Queue
        │
        ▼
 Binary Search Trees

Additional supporting data structures:

  • Queue (node transfer)
  • Stack (zigzag visualization)

⚙️ Simulation Rules

  • Each hexagon stores up to six Binary Search Trees
  • Trees are loaded from a text file
  • Tree priority is determined by height
  • Odd rounds remove the first tree
  • Even rounds remove the highest-priority tree
  • Removed trees are traversed in post-order
  • Nodes are redistributed across the next hexagon
  • The simulation updates the screen after every round

🖼 Conceptual Model

Note: The following diagram is taken from the original university assignment and is included for illustrative purposes. It represents the data flow implemented by the application.

Although the program runs entirely in the console, each displayed number represents the current state of a hexagonal priority queue whose internal structure consists of Binary Search Trees (BSTs). Trees are transferred between neighboring hexagons according to the simulation rules.

Assignment Diagram


📄 Documentation

The doc folder contains:

  • Project Report
  • Original Assignment Specification

▶️ How to Build and Run

Open a terminal in the project's root directory and run:

mingw32-make

The Makefile automatically:

  • Compiles all source files
  • Generates the executable
  • Launches the application

🎓 Academic Information

  • Sakarya University, Computer Engineering
  • Data Structures, 2025–2026

About

Interactive hexagonal priority queue simulator built with C++ using custom binary search trees and linked data structures.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages