FDM Group Interview Question

A couple of coding questions in the technical test