QUESTION 10 What does the following function f do? (a is an array, n is the size of the array) void f(int all, int n) {
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
QUESTION 10 What does the following function f do? (a is an array, n is the size of the array) void f(int all, int n) {
QUESTION 10 What does the following function f do? (a is an array, n is the size of the array) void f(int all, int n) { int i; for (i=0;i<n;i++) swap(a, a[n-i-1]); 1 It reverses array a. It makes NO change to array a. It shifts all the numbers by 1. It swaps the first and the last elmenet of array a. QUESTION 11 Which of the following sorting algorithms requires most amount of additional memory? merge sort quick sort selection sort insertion sort QUESTION 12 Which of the following sorting algorithms has the best best case complexity? merge sort insertion sort selection sort quick sort
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!