You are viewing a single comment's thread. Return to all comments →
My solution with c#
static int runningTime(int[] arr) {
int shist=0, aux=0, index=0; for (int i=0; i<arr.Length-1; i++){ aux=arr[i+1]; index=i+1; while (index>0){ if (aux <arr[index-1]) shist++; index--; } } return shist; }
Seems like cookies are disabled on this browser, please enable them to open this website
Running Time of Algorithms
You are viewing a single comment's thread. Return to all comments →
My solution with c#
static int runningTime(int[] arr) {