Finished the SJF analysis algorithm