Created by: Rami Isaac
Dynamic programming, weighted interval scheduling algorithm. Sorts intervals in nondecreasing order and uses binary search to find non-conflicing interval. Runs in O(n log(n)) time. Implemented in Python. Reads intervals from .csv and returns largest interval value to console.
- Python 3.9.2 (may or may work with other versions of Python)
First row formatted as A1 = "START", B1 = "FINISH", C1 = "VALUE" OR "START, FINISH, VALUE" if plaintext file.
ADDITIONAL ROWS:
- Each row represents a new interval
- Formatted as start position, end position, interval value.
Intervals do not need to be sorted. See requests-a.csv for example.
INSTALLING
- Install Python 3.9.2.
- Clone this repository
RUNNING
- Open a command terminal, and cd to the location of the script.
- Run this script using 'schedule.py'.
- The script will test 3 internal files, then prompt you to decide whether you would like to test your own file.
- The maximum value for your file be shown in the terminal.