State Farm Interview Question

one coding question w 30 minutes then had to explain answer