X interview question

Describe how you will code an infinite loop problem