, ,

Sometime back I had posted this stuff. It was about partitioning a sequence into N more or less equal parts.

You can see my javascript solution here and python solution here. Suggestions and criticisms most welcome.

Update : In the javascript version, instead of bothering to initialize the “min” variable with a BIG value, it is enough to initialize it with the first element of the input array.