If there's only one overarching topic of computer science, it's difficult to not give that award to Big O. Having an efficient algorithm can make the difference between a program running within a few minutes and the program taking a few years (or even worse, until the heat death of the universe).
Bogosort is an incredibly inefficient sorting algorithm that sorts a set of data purely by chance. Here's how it works:
- Randomize the data by scrambling the set
- Check if the data is sorted
- Repeat steps 1 & 2
Bogosort's average runtime is O(n!), making for a very, VERY slow sorting algorithm. You can learn more about bogosort and other interesting sorting algorithms in one of my Medium blog posts, here.