4 ms·
Welcome to HN. I was referring to OPs algorithm which was bogo-bogosort. At first I though my change would not increase the complexity, but I think it is depe
by deletes 13y ago
Welcome to HN.
I was referring to OPs algorithm which was bogo-bogosort.
At first I though my change would not increase the complexity, but I think it is dependent on size of input since for every recursion there is a chance to fail and start completely over, where the number of recursion is dependent on input size. Therefore it adds to complexity.