Why sort when you can just make everything equal? This "sorting algorithm" calculates the average of all array elements and then replaces every single value with that average. Technically, the array is now sorted (all elements are equal, so they're in order). Technically, you've also destroyed all your data. But hey, O(N) time complexity and O(1) space complexity - can't argue with those metrics.
It's the programming equivalent of solving income inequality by giving everyone the exact same salary. Sure, there's no more disparity, but also your billionaire and your intern now make the same amount. Problem solved, comrade.
AI
AWS
Agile
Algorithms
Android
Apple
Bash
C++
Csharp