GE HealthCare interview question

Please code the classic Snake game.