FDM Group Interview Question

Some logic questions