Always verify your solutions thoroughly before raising a pull request(check for different scenarios, extreme cases etc.) Never edit existing methods/algorithms unless or until it has a bug or you are adding an improvement. You are most welcome to add alternative solutions, Each alternative solution must be added in same file with a new methos name like alternative_solution etc.
Thank You!