Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How do I change the economy to Matt Lab Code?

1 visualización (últimos 30 días)
학준 김
학준 김 el 8 de Oct. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
int[] countingSort(int[] a, int k) {
int c[] = new int[k];
for (int i = 0; i < a.length; i++)
c[a[i]]++;
for (int i = 1; i < k; i++)
c[i] += c[i-1];
int b[] = new int[a.length];
for (int i = a.length-1; i >= 0; i--)
b[--c[a[i]]] = a[i];
return b;
}
How do I change the economy to Matt Lab Code?

Respuestas (1)

Gaurav Garg
Gaurav Garg el 14 de Oct. de 2020
Hi,
You can refer to the link here for MATLAB version of counting sort.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by