Maxwell Systems Interview Question

Had to write two functions, just used basic programming logic didn't need advanced data structures or algorithms knowledge.