Agilysys Interview Question

parse function pipes and cisterian,probability puzzles