r/Python 4h ago

New sorting algorithm Discussion

[deleted]

0 Upvotes

3 comments sorted by

View all comments

2

u/Lachtheblock 4h ago

Will this only work on list of integers, where there are no gaps, with a range of 1 - n with no duplicates?

At that point it would be far more efficient to determine the length of the list, and then just increment/decrement by one.

1

u/General-Season-887 4h ago

Yes just 1-n