I am trying to enter into a data science job. I gave some internship interviews but have not had luck yet. Last week, I gave an interview where one of the panellists asked one hypothetical question:
“Imagine you have asked to write an algorithm to control traffic light system with a goal to keep road user happy. What approach would you take to design such algorithm”.
I was not able to give a good answer and lost the opportunity. I know about some approaches to designing algorithms such as dynamic programming, greedy method etc. However, none of them seems to be fit to the question asked by panellists. Since then I am curious about what approach can be used to design an algorithm to tackle the real-time problem.
Could anyone shed light on this question?