dankogai / js-combinatorics

power set, combination, permutation and more in JavaScript
MIT License
742 stars 97 forks source link

Fetch results on demand like pagination for large output #47

Closed shivrajsa closed 6 years ago

shivrajsa commented 6 years ago

Thank you for this great library, very useful.

I am wondering, if is it is possible to create pagination for large output and create and fetch only required output based on page number to make it memory efficient.

It is easy to create pagination when you have all results in hand, but it is not memory efficient.

Is there a way to do that ?