GulfOfMexico icon indicating copy to clipboard operation
GulfOfMexico copied to clipboard

Standard library implementations: Quantum BogoSort

Open PThorpe92 opened this issue 2 years ago • 0 comments

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.

PThorpe92 avatar Jun 04 '23 19:06 PThorpe92