Vymo interview question

all paths in matrix