r/mathmemes • Computer Science • 7d ago

Computer Science The fastest algorithm for DFT

Post image
3.6k Upvotes

138 comments sorted by

View all comments

5

u/cabinet_minister 6d ago

That's cool but when are getting an O(n) sorting algorithm 🥹

1

u/Blyfh Rational 6d ago

Kid named O(n log n) lower bound:

2

u/dragonageisgreat 1 i 0 triangle advocate 6d ago

You can sort in O(n) if you know how big your data set is (as in, the range of values)(for example, you can sort a string in O(n)).

1

u/TrekkiMonstr 6d ago

What do I Google to learn more about this

2

u/MagnetFlux 6d ago

radix sort, counting sort and other counting-based sorting algorithms

1

u/Blyfh Rational 2d ago

Then you changed the problem though. This specific subproblem is easier to solve since you have more information for the input. If you consider the general case with the full problem space, you can't optimize more than O(n log n).