DraftKings Interview Question

The runtime of my Algorithm