A sequence of task given where each task identified by a unique id. There is cool down period to be observed before executing same task again. Find the execution time for the task sequence.
Example:
Task sequence: 1 2 1 2
cool-down period: 3
Execution time: 6 (o/p seq: 1 2 . . 1 2)
This was very easy qs. But I ended up coding to find answer for the extra execution time and not the total time, due to miscommunication on my part. When interviewer pointed, I re-wrote the whole code, but seems it gave negative impression on her, and she did not proceeded to ask 2nd question. But I can tell there was no problem with my code.