Select the correct option to test your answer:
More Computer Questions
What will be the auxiliary space complexity of the following code? #include <bits/stdc++.h> using namespace std; void convert(int arr[], int n) { int temp[n]; memcpy(temp, arr, n*sizeof(int)); sort(temp, temp + n); unordered_map<int, int> map; int sort_index = 0; for (int i = 0; i < n; i++) map[temp[i]] = sort_index++; for (int i = 0; i < n; i++) arr[i] = map[arr[i]]; } void printArr(int arr[], int n) { for (int i=0; i<n; i++) cout << arr[i] << " "; } int main() { int arr[] = {10, 20, 15, 12, 11, 50}; int n = sizeof(arr)/sizeof(arr[0]); convert(arr , n); printArr(arr, n); return 0; }
Which function calculates the largest value in a set of numbers in Excel?
Working of the WAN generally involves
What will be the output of the following code? #include <iostream> using namespace std; int main() { int arr[] = {1,2,3,4,5,6}; int n = sizeof(arr)/sizeof(arr[0]); int d=4; int temp[10]; for(int i=0;i<d;i++) temp[i]=arr[i]; int j=0; for(int i=d;i<n;i++,j++) arr[j]=arr[i]; int k=0; for(int i=n-d;i<n;i++,k++) arr[i]=temp[k]; for(int i=0;i<n;i++) cout<<arr[i]<<" "; return 0; }
Which of these is a private data field? def Demo: def __init__(self): __a = 1 self.__b = 1 self.__c__ = 1 __d__= 1