keon / algorithms

Minimal examples of data structures and algorithms in Python
MIT License
23.97k stars 4.6k forks source link

modified the return from both main and helper. #886

Closed patilabhay679 closed 1 year ago

patilabhay679 commented 1 year ago

It looks like there is no need to create a copy, we can replace the new elements inplace by mutating the contents of array.