add markdown identifier to code language (#36503)

This commit is contained in:
Cleo Aguiar
2019-07-24 10:18:51 -03:00
committed by Randell Dawson
parent 590438ecfa
commit dd3c0e0893

View File

@ -66,9 +66,8 @@ Finally , we sort according to the hundred's digit (most significant digit):
The array becomes : 10, 11, 17, 21, 34, 44, 123, 654 which is sorted. This is how our algorithm works.
An implementation in C:
```
```c
void countsort(int arr[],int n,int place){
int i,freq[range]={0}; //range for integers is 10 as digits range from 0-9
int output[n];
@ -88,7 +87,6 @@ void countsort(int arr[],int n,int place){
}
void radixsort(ll arr[],int n,int maxx){ //maxx is the maximum element in the array
int mul=1;
while(maxx){
countsort(arr,n,mul);
@ -99,7 +97,7 @@ void radixsort(ll arr[],int n,int maxx){ //maxx is the maximum elemen
```
An implementation in python :
```
```py
def counting_sort(arr, max_value, get_index):
counts = [0] * max_value