Capital One Interview Question

How would you further improve your solution?