ACS Solutions interview question

One coding question and few other puzzels