Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How do I change the economy to Matt Lab Code?

1 回表示 (過去 30 日間)
학준 김
학준 김 2020 年 10 月 8 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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?
  2 件のコメント
Rik
Rik 2020 年 10 月 8 日

回答 (1 件)

Gaurav Garg
Gaurav Garg 2020 年 10 月 14 日
Hi,
You can refer to the link here for MATLAB version of counting sort.

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by