Here is the code for the previous post

I should have wrote this code in the first place, took me only 5 minutes anyway.
spamsink was right: apparently in runs in slightly below O(n^2).
But my proof of O(n^3) still stands, and I found a German university computer science textbook that also proves it should be O(n^3) in the worst case... Riddles!
I should have wrote this code in the first place, took me only 5 minutes anyway.
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
But my proof of O(n^3) still stands, and I found a German university computer science textbook that also proves it should be O(n^3) in the worst case... Riddles!