This repository contains implementations of fundamental data structures and algorithms developed as part of the Data Structures course at AUEB (Athens University of Economics and Business).
DataStructuresJava/
├── assignment1/ # Stack, Queue implementations and HTML tag validator
├── assignment2/ # Task scheduling with greedy algorithm
├── assignment3/ # Documentation and screenshots
├── etc/ # Alternative implementations and build artifacts
└── README.md
Implementation of fundamental data structures using generic types:
Core Data Structures:
- StringStack - Generic stack implementation with standard operations (push, pop, peek)
- IntQueue - Generic queue implementation with enqueue/dequeue operations
- Node - Node-based data structure for linked implementations
Application:
- TagMatching - HTML tag validator using stack-based parsing
- Validates matching opening and closing HTML tags
- Uses stack to track nested tag structure
- Reports whether an HTML file has properly matched tags
Key Files:
StringStack.java/StringStackImpl.java- Stack interface and implementationIntQueue.java/IntQueueImpl.java- Queue interface and implementationTagmatching.java- HTML tag validation applicationMain.java- Test cases demonstrating stack and queue operations
Implementation of a greedy algorithm for load balancing tasks across multiple processors:
Components:
- MaxPQ - Max Priority Queue implementation for processor management
- Greedy Algorithm - Schedules tasks to minimize makespan (maximum completion time)
- Task - Represents a task with ID and execution time
- Processor - Represents a processor with task list and total active time
- List - Custom list implementation for storing tasks
Algorithm:
- Reads processor count and task list from input file
- Assigns tasks to processors using greedy approach
- Always assigns next task to processor with minimum current load
- Calculates and reports the makespan (maximum processor load)
Key Files:
Greedy.java- Main algorithm implementationMaxPQ.java- Priority queue for processor schedulingTask.java/Processor.java- Core data modelsList.java- List implementation with insert/remove operationsSort.java- Sorting utilitiesComparable.java- Custom comparable interface
Contains documentation, specifications, and implementation screenshots for the third assignment including:
- Assignment specification documents (PDF, DOCX)
- Implementation screenshots demonstrating functionality
- Submission archives
- Language: Java
- Concepts:
- Generic data structures
- Stack and Queue ADTs
- Priority Queues
- Greedy algorithms
- File I/O
- Exception handling
cd assignment1
javac *.java
java Maincd assignment1
javac Tagmatching.java StringStack*.java Node.java
java TagMatchingcd assignment2
javac *.java
java Greedy <input_file>Example:
java Greedy input.txtThe task scheduling program expects input files with the following format:
<number_of_processors>
<number_of_tasks>
<task_id> <execution_time>
<task_id> <execution_time>
...
- Implementation of generic data structures in Java
- Understanding of stack and queue operations and applications
- Priority queue implementation and usage
- Greedy algorithm design and analysis
- Load balancing and task scheduling problems
- File parsing and error handling
The etc folder contains:
- Alternative implementations and early versions
- Eclipse project settings and build artifacts
- Assignment specifications and requirements documents
- Original archive files
Ioannis Tsintzos - AUEB Student
Educational project for academic purposes.