OYO interview question

Find path using graph and permutation