Wiley Interview Question

Gave a coding assignment to do.