Home / MCQ Bank / Computer
Computer Plus Plus Miscellaneous Difficulty: Medium

What is the use of front() function in heap?

Select the correct option to test your answer:

More Computer Questions

To validate an e-mail address, which flag is to be passed to the function filter_var()? A . . . . . . . . is a variable that holds one value at a time. What is a common strategy to ensure that a hash table performs optimally under varying loads? If the background image is smaller than the screen, what will happen ? What will be the time complexity of the following code? #include <bits/stdc++.h> using namespace std; void func(int arr[], int left, int right) { if (left >= right) return; int temp = arr[left]; arr[left] = arr[right]; arr[right] = temp; func(arr, left + 1, right - 1); } void printArray(int arr[], int size) { for (int i = 0; i < size; i++) cout << arr[i] << " "; } int main() { int arr[] = {1,2,3,4}; int n = sizeof(arr) / sizeof(arr[0]); func(arr, 0, n-1); printArray(arr, n); return 0; }