BNY Interview Question

one was on graph and second reverse the number