Parkings simuleren

Log in om je oplossingen te testen.
import heapq class PriorityQueue: def __init__(self): self.content = [] def add(self, item): heapq.heappush(self.content, item) def peek(self): return self.content[0] def poll(self): return heapq.heappop(self.content) if len(self.content) > 0 else None def is_empty(self): return len(self.content) == 0 def __str__(self): return str(heapq.nsmallest(len(self.content), self.content)) def simuleer_parking(plaatsen, bloktijd, klanten): pass

  Python sandbox

In dit venster kan je Python-code uitvoeren zonder iets te moeten installeren. De code die je hier schrijft wordt niet automatisch ingediend in Dodona.

Testgeval dat gedebugd wordt