You are given a list of calls, where each call has a type such as search, tts, or db.lookup. Each call type has a cooldown period. There are m time slots and two lanes. In one time slot, you may start at most one call per lane. The same call type cannot be started again until its cooldown has passed.
Return an optimal schedule that starts the calls as early as possible while respecting the cooldown rules.
Example:
calls = ["search", "tts", "search", "db.lookup", "search"]
cooldown = {"search": 2}
m = 2
One optimal schedule by time slot (two lanes):
t=0: startsearch,ttst=1: startdb.lookupt=3: startsearcht=6: startsearch
This problem is a scheduling task with per-type cooldowns and two parallel lanes. The main idea is to track when each call type becomes available again, then greedily place any currently valid calls into the earliest possible time slot. A hash map is typically used to store cooldown expiry times, and a priority queue or greedy simulation helps choose the next feasible calls efficiently. The key challenge is balancing cooldown constraints with parallel execution so the overall schedule finishes as early as possible.