Appian interview question

Treasure Hunt question on graphs