Citadel interview question

Coding 2 assignments for couple h