Synoptek interview question

Pseudo-code on the development problem