a javascript library to solve the proposed problem for the interview follup question