Broadcom interview question

DSA, LLD for snake game, One machine coding for string matchin