This repository contains Java implementations of fundamental data structures and algorithms, completed as part of a university assignment.
1. Dynamic Set (using a BST)
A custom implementation of a dynamic set that supports the following operations
ADDREMOVEUNIONINTERSECTIONDIFFERENCESUBSET
2. Minimum Cost to Connect Ropes
Solves the "minimum cost to connect ropes" problem by combining the two shortest ropes at each step. This is implemented using a custom Min-Priority Queue built from a doubly linked list.
-
Compile the Java files:
javac *.java
-
Run the desired part:
-
To run the Dynamic Set demonstration: java DynamicSet
-
To run the Minimum Cost to Connect Ropes algorithm: java MinConnectRopes
-
- Java