****** Ionic - DevMetric by Evans Data

DevMetric is the spot for developers to rate and review software tools.
Sign up for free to start sharing your opinion today!

Currently Browsing:
Newest
All
 

Join the Evans Data Developer Panel!

As a DevNet panelist you will:

1. Have your voice heard on hot topics, innovative technologies and key initiatives.
2. Receive points for every validated survey submission.
3. Redeem award points for cash.

SOLVE THIS CODE

What does this code do?

    void guess_my_function(int arr[], int left, int middle, int right){
        int low = middle - left + 1;
        int high = right - middle;
        int L[] = new int[low];
        int R[] = new int[high];
        int i = 0, j = 0;

        for (i = 0; i < low; i++)
            L[i] = arr[left + i];
        
        for (j = 0; j < high; j++)
            R[j] = arr[middle + 1 + j];
        
        int k = left;
        i = 0;
        j = 0;

        while (i < low && j < high){
            if (L[i] <= R[j]){
                arr[k] = L[i];
                i++;
            } else {
                arr[k] = R[j];
                j++;
            }
            k++;
        }
 
        while (i < low){
            arr[k] = L[i];
            i++;
            k++;
        }
 
        while (j < high){
            arr[k] = R[j];
            j++;
            k++;
        }
    }

Programming Language: Java

Newsletter

Get weekly reviews sent directly to your inbox!