wrote algorithm to move minimum process to front of queue