FDM Group interview question

can you adapt ?