Justworks Interview Question

Some algorithms.