Niclas Alexandersson edited b) Find the assignment of the rooms.tex  almost 10 years ago

Commit id: 3ad7eefa666d66afd9622cc71ed656e0792efad7

deletions | additions      

       

\section{b) Find the assignment of the rooms}  \begin{verbatim}  def efficient_lsp(courses):  courses <- sorted(courses, key=lambda c: c.start())  days <- priority_queue(sorted: key=lambda d: d.getLast().finish())  for i in courses:  day <- []  if len(days) > 0 and !collides(i, days.peekFirst().getLast()):  day <- collisions.removeFirst()    day.addLast(i)  days.add(day)  return asList(days)  \end{verbatim}