Walk me through how you would solve a technical assessment problem involving logical reasoning and basic coding.