Broadridge Interview Question

write a backend code for a scenario