We are not merely looking for a functionally correct solution. Clearly calling out your assumptions, having a readme, well documented code, good naming, atomic commits and writing tests make you a better fit for us. Please go through the suggestions we include in the problem we have shared with you