Prodapt Solutions interview question

Q1- Print the snake matrix