Amdocs interview question

waterfall