Computing time complexity in C [closed]

For comparison sorting we consider the number of comparisons, sorting complicated objects this usually dominates. Your outer loop always runs count times, your inner loop always runs on average ~count / 2 times. Every iteration of the inner loop always does one comparison. Hence you get best, worst and average case is count * count … Read more