Broadridge Interview Question

Some white board coding. Not too hard