Clipboard Interview Question

How did I solve the first Case Study