1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
shepuryov [24]
3 years ago
8

int foo(int A[], int left, int right){ int i, x, q, N; if(right <= left) return 1; x = 0; for(i=left; i <= right; i++) x +

= A[i] % 2; // busy work... N = right-left+1; q = left + (N/3); return x + foo(A, left, q) + foo(A, q+1, right);
Computers and Technology
1 answer:
sineoko [7]3 years ago
3 0

Answer:

quicksort.cpp

void quickSort(int arr[], int left, int right) {

     int i = left, j = right;

     int tmp;

     int pivot = arr[(left + right) / 2];

 

     /* partition */

     while (i <= j) {

           while (arr[i] < pivot)

                 i++;

           while (arr[j] > pivot)

                 j--;

           if (i <= j) {

                 tmp = arr[i];

                 arr[i] = arr[j];

                 arr[j] = tmp;

                 i++;

                 j--;

           }

     };

 

     /* recursion */

     if (left < j)

           quickSort(arr, left, j);

     if (i < right)

           quickSort(arr, i, right);

}

You might be interested in
Which is true for a hosted blog software
professor190 [17]
Since you have not provided the choices wherein I will have to choose from to arrive at an answer, I will just explain to you the concept revolving around a hosted blog software. Hosted blog software are basically installed by the owner of the web server in which among its famous platforms is the Blogger.
7 0
3 years ago
Read 2 more answers
The major difference between a calculator and a computer, when performing calculations, is that a
tester [92]
A calculator is slower and needs more human assistance
7 0
3 years ago
Read 2 more answers
What are two fundamental components of data structures?
Fed [463]
Organization and access method.

Hope this helped! :)

- Jujufire
8 0
3 years ago
What is the name of the function below?<br><br> function go(){<br> alert("hello everybody");<br> }
labwork [276]

Answer:

It’s Java script I think and it makes something say hello everybody

Explanation:

6 0
3 years ago
A network administrator is configuring an ACL with the command access-list 10 permit 172.16.32.0 0.0.15.255. Which IPv4 address
lord [1]

Answer:

For this wild card mask 0.0.15.255 the ACE IP address will be 172.16.47.254

Explanation:

ACL is the access control list that is used to enlist the ip addresses that allowed or restricted to access the network. ACE is an IP address from the list ACL that has all rules and regulations related to access of network. The ACE could be in the range of IP address in ACL. ACL can be calculated with the help of initial IP address adding with wild card mask.

So

Initial IP address is = 172.16.32.0

Wild card mask =0.0.15.255

by adding above values we can find the last IP address of ACL.

after addition

Final IP address is = 172.16.47.255

The options that are available with question, Only option between the range is  172.16.47.254. So we can say that This is the only ACE IP address in options.

7 0
3 years ago
Other questions:
  • Nick is a food blogger. He first writes his draft on an electronic document, checks and corrects mistakes, and pastes the conten
    9·2 answers
  • Data warehousing and data mining mean the same thing when applied to CRM
    7·2 answers
  • Which key you should you press to leave the cell as it orginally was
    14·2 answers
  • Amy just added a 462 meter run of fiber optic cable to the network what should she do next?
    10·1 answer
  • Drag the correct type of update to its definition.
    14·1 answer
  • Explain three specific &amp; major security threats to internet users. In each case, address whether or not the vulnerabilities
    15·1 answer
  • What will be the results of the following code? final int Array_Size = 5;An error will occur when the program runs. There will b
    10·1 answer
  • Which of the following would be better communicated with an image than with text?
    9·1 answer
  • Help its in binary and im a small brain for that
    7·1 answer
  • What is the difference between Remote Assistance and Remote Desktop?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!