I been trying to Implement `Count Sort Algorithm`.

> 
> Every time I run the **algorithm** it gives me wrong answer at **Index 0 and 1**
> 
> 
> 

It is been continuous 20 hours, and I am unable to track what I am doing wrong...

```
Generated_Array 17  88  14  91  151 50  95  175 92  49  116 67  111 195 37  63  144 50  65  90  
Sorted_Array    0   14  17  37  49  50  50  63  65  67  88  90  91  92  95  111 116 144 151 175

Generated_Array 8   109 33  37  196 156 158 142 52  179 152 182 171 27  54  75  139 193 25  190 
Sorted_Array    0   8   25  27  33  37  52  54  75  109 139 142 152 156 158 171 179 182 190 193

Generated_Array 51  24  132 150 73  198 111 55  64  145 15  179 117 6   16  120 155 45  52  108 
Sorted_Array    0   198 15  16  24  45  51  52  55  64  73  108 111 117 120 132 145 150 155 179 

Generated_Array 15  119 162 199 104 104 71  69  40  141 50  119 32  6   155 75  150 140 164 6   
Sorted_Array    0   199 6   15  32  40  50  69  71  75  104 104 119 119 140 141 150 155 162 164 

Generated_Array 22  150 91  145 164 151 145 118 123 105 56  78  185 57  114 128 152 20  124 2   
Sorted_Array    0   185 20  22  56  57  78  91  105 114 118 123 124 128 145 145 150 151 152 164 

Generated_Array 132 191 44  185 116 186 107 195 104 55  107 48  45  109 38  76  45  143 31  58  
Sorted_Array    0   195 38  44  45  45  48  55  58  76  104 107 107 109 116 132 143 185 186 191 

Generated_Array 104 139 137 47  22  180 161 170 39  165 12  16  49  177 11  83  30  34  29  61  
Sorted_Array    0   180 12  16  22  29  30  34  39  47  49  61  83  104 137 139 161 165 170 177 

```

Here is the algorithm I am using:

```
int[] Counting_sort(int[] Array, int Max)
{
    int No_Of_Elements = Array.Length;
    int[] Sorted_Array = new int[Array.Length];
    int[] C = new int[Max+1];

    for (int i = 0; i < Max; i++)
    {
        C[i] = 0; 
    }

    for (int j = 0; j <No_Of_Elements; j++)
    {
        C[Array[j]] = C[Array[j]] + 1;
    }

    for (int i = 1; i <Max; i++)
    {
        C[i] = C[i] + C[i - 1];
    }

    for (int j = No_Of_Elements-1; j >= 0; j--)
    {
        Sorted_Array[C[Array[j]]] = Array[j];
        C[Array[j]] = C[Array[j]] - 1;
    }

    return Sorted_Array;
}

```