GulfOfMexico
GulfOfMexico copied to clipboard
Standard library implementations: Quantum BogoSort
It's obvious a std lib sort() function on arrays in dreamberd should mutate in place. We can't have copies being thrown around, unless of course you declare a const const const or a var const.
So the .sort method on arrays will return a randomly sorted array (most of the time) however, there will be an instance where this will return a sorted array in O(1) time. So if I read the docs correctly..
when ;array.sort()
will essentially run Quantum bogo sort in a loop until it's sorted. This may be one of the greatest breakthrough's in modern computing.
Should run in O(?log ?) time and O(1) space.