DISH interview question

How to implement throttle function