Prudential Interview Question

A coding challenge asking me to implement some DSA.