PriorityQueue implemented using a heap, written in Javascript/Jquery
It’s important that all files must remain in the folder they are in or references will break. Next, open index.html in either Google Chrome of Safari. Click on the “Choose File” button to select a .txt in the proper format. The data must be in the (x,y) format where x is a string that represents a rule and where y is an integer that represents the priority in the queue. Each cycle is to be presented by a new line (“\n”).
Once you select a file, you will be able to preview its contents on the webpage. Hit the Go button to execute the program. Results will be displayed below. The maximum number of cycles that will execute is 30, as defined by the project specifications. This can be adjusted by a constant at the top of the JavaScript file for further testing. To start over, hit the reset button.