Scheduling algorithm which uses Shortest Job First algo in C