Question d’entretien chez Amazon

one graph question ,one backtracking question