Yext Interview Question

snake traverse a matrix