FDM Group Interview Question

Logic questions and pseudo code