Coding problem from a job interview. I initially did this on paper and relayed it over the phone which was challenging. After the interview I went back and implemented the 2 solutions I thought of as well as a small unit test.