Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
“ After executing a task we decrease its frequency and put it in a waiting list....

Akaash

Jan 29, 2023

“ After executing a task we decrease its frequency and put it in a waiting list. In each iteration, we will try to execute as many as k+1 tasks.”

Would be good to explain why and how we get k+1 here. I’m not sure I follow.

0

0

Comments
Comments
Design Gurus
Design Gurus3 years ago

It is based on the problem requirement, "the cooling period for all tasks is ‘K’ intervals."

Once we execute a task, we have to wait for 'K' intervals before we could execute it again.

K
k 2 years ago

a _ _ a = 2 cooling intervals = 3 Distance apart.