Fast Enterprises Interview Question

Some logic questions and asked me to write pseudocode to solve a problem.