Chase Interview Question

Q: Explain your thought process behind your code.