# Implementation of Comparison Counting sort algorithm.
class ComparisonCountSort:

    def sort(A):
        # Initialise arrays
        Count = [0 for i in range(len(A))]
        S = [0 for i in range(len(A))]

        # Get length
        n = len(A)

        for i in range(0, n-1):
            k = i + 1
            for j in range(k, n):
                if(A[i] < A[j]):
                    Count[j] = Count[j] + 1
                else:
                    Count[i] = Count[i] + 1
        for i in range(0, n):
            S[Count[i]] = A[i]

        return S

f282dd382cad5379119e64269e0af44a1eaca2d3
<mask token>

class ComparisonCountSort:
    <mask token>

class ComparisonCountSort:

    def sort(A):
        Count = [(0) for i in range(len(A))]
        S = [(0) for i in range(len(A))]
        n = len(A)
        for i in range(0, n - 1):
            k = i + 1
            for j in range(k, n):
                if A[i] < A[j]:
                    Count[j] = Count[j] + 1
                else:
                    Count[i] = Count[i] + 1
        for i in range(0, n):
            S[Count[i]] = A[i]
        return S

# Implementation of Comparison Counting sort algorithm.
class ComparisonCountSort:

    def sort(A):
        # Initialise arrays
        Count = [0 for i in range(len(A))]
        S = [0 for i in range(len(A))]

        # Get length
        n = len(A)

        for i in range(0, n-1):
            k = i + 1
            for j in range(k, n):
                if(A[i] < A[j]):
                    Count[j] = Count[j] + 1
                else:
                    Count[i] = Count[i] + 1
        for i in range(0, n):
            S[Count[i]] = A[i]

        return S
