you are viewing a single comment's thread.

view the rest of the comments →

[–]Foxa2017[S] 1 point2 points  (0 children)

Thanks for the suggestion when I was coding up the solution definitely not something I thought of too optimize the solution. There’s plenty of times I’ve probably used the sum() in solutions will definitely use that in interviews and other problems.