The “APS” (All Possible Sorting) algorithm sorts an array A of size n by generating all possible sequences of elements of n, and for each sequence, checking to see if the elements are in sorted (ascending) order.
a) What is the worst-case time complexity of APS? Explain your logic / show your work.
My answer:
Worst case is O(n!) because it generates all possible sequences and then checks if sorted.
Preferably, I would like someone to tell me if I'm right or wrong and how to get to the answer. This big O stuff confuses me.