Quicksort algorithm is one of the most important algorithm in computer science that every software developer should should know.
Moreover, the developer should understand why the quicksort is called quicksort (as being statistically quicker then earlier merge sort) and what is not a quicksort algorithm. This is now especially vital in the era of an AI and bloated generated code.Not so long time ago, when I noticed some video from some popular coding youtuber about his experiance in the rising era of AI and coding automation by comment driven development (before ChatGPT or Anthropic). I believe it was GitHub Copilot, when the developer used the IDE and while start typing comment about sort algorithm he got suggestion with imitation implementation of the quick sort algorithm. AI did it, but it was not quick sort. It looked like a quick sort, it returns even the correct results, but it was fundamentally wrong and it's not a quick sort!Here is videos for the reference I lately found:
source of the full video: Video on YouTube (it's about 1 minute from ~0:44 - 2:01)
or another Youtube Short with other people trying to understand it why: Youtube Short (this one if funny one)
So the main point for the Quicksort algorithm is to understand how it works. The foundation for quick sort IT DOES NOT REQUIRE MEMORY ALLOCATION, is works with swapping the values, and that's why it's really fast. In other "imitations" of implementations for the quicksort, they create new arrays, and allocate a new memory for parts of the implementation. That's why it's the end it may be even slower then other algorithms, because it takes much more memory/time to move the elements over the places (at this point watch the short above if you didn't).
Realization of terrified truth
At 2026-04-22 I did the test and ask Google about the quick sort algorithm. Here is actually the first example from google list I found after typing "quicksort golang" in Google:
I've opened the first page from the results and saw this "quick sort" (aka. abomination) algorithm.
If you look at this code, it's not a quick sort. It's looks like one, but it's NOT quick sort! In next section I will shortly explain how the quicksort works so you will not be deceived.
At this point, I was wondering if there are more examples we may yet find online, which will "try" to explain "how the things works". Especially using the wrong code, but formed in just different (maybe easier) way to understand how it works. In this context it reminds me a funny and in same time also a scary phrase "fake it, till you make it". I am worried that, we may see more often this kind of "gems" in the future, especially in begin of AI slop era.
I was literally terrified, because if I can so easily find a thing that is wrong and without certain knowledge someone in the need would learn the wrong thing. this misconception of the knowledge, many tutorials, how to do things, based on the example of how simple quicksort works, there are so many places where you can find actually the wrong information about the quick sort.