4 ms·
Quantum sort: O(n) 1. Use quantum device to randomize order of array 2. Check if sorted 3. If not sorted, destroy universe In all universes which are left,
by _0ffh 11y ago
Quantum sort: O(n)
1. Use quantum device to randomize order of array
2. Check if sorted
3. If not sorted, destroy universe
In all universes which are left, the array is sorted. (Dependencies: Many worlds interpretation, Doomsday device.)
Edit: Formatting.
- iofj 11y agoWhat happens if you have a bug in there ?