Mercari interview question

maximum length of graph, DP, bfs, array