Small tidbit, you can break or simply return num inside the for loop on line 39. No need to keep checking once you got one.
Ah, thank you! I will take that into consideration next time.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.