# Differences

This shows you the differences between two versions of the page.

 bogosort [2014/05/04 16:25]127.0.0.1 external edit bogosort [2015/02/02 08:28] (current) Both sides previous revision Previous revision 2014/07/05 15:13 will 2014/05/04 16:25 external edit2014/04/28 22:45 will 2014/04/27 15:14 will 2013/06/07 21:31 will 2013/06/07 21:21 will created Next revision Previous revision 2014/07/05 15:13 will 2014/05/04 16:25 external edit2014/04/28 22:45 will 2014/04/27 15:14 will 2013/06/07 21:31 will 2013/06/07 21:21 will created Line 4: Line 4: Bogosort takes on average $n!$ attempts to select the right answer. Since each ''​isSorted''​ and ''​shuffle''​ are $O(n)$, bogosort takes $O(n.n!)$ time overall. The extreme time complexity is the reason this example is only sorting 5 items. Bogosort takes on average $n!$ attempts to select the right answer. Since each ''​isSorted''​ and ''​shuffle''​ are $O(n)$, bogosort takes $O(n.n!)$ time overall. The extreme time complexity is the reason this example is only sorting 5 items. + + This implementation makes use of [[Is Sorted]] and [[Fisher-Yates shuffle]]. ===== Properties ===== ===== Properties =====