Sorting Algorithms Questions Medium
The time complexity of the comb sort algorithm is O(n^2) in the worst case scenario. However, in the average case, it has a time complexity of O(n^2/2^p), where p is the number of increments used in the algorithm. The best case time complexity is O(n log n) when the input array is already sorted.