Sprig interview question

what would i have done differently