Implement a bogus sorting algorithm called bogo sort that uses your shuffling algorithm from the previous exercise
Question:
Implement a “bogus” sorting algorithm called bogo sort that uses your shuffling algorithm from the previous exercise to sort an array of numbers. The bogo sort algorithm is the following:
Obviously, this is not a very efficient sorting algorithm, but it eventually does shuffle the array into order if you let it run long enough. Try running it on a very small array, such as 8 or 10 elements, to examine its runtime. What is your best guess about the complexity class (big- Oh) of this silly algorithm?
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Question Posted: