Takes in a list of people standing in line at the store, and serves them based on a given value. Uses a heap and priority queue.