Which of the following sorting algorithms is in-place?
Given a hash table T with 25 slots that store 2000 elements, the load factor α for T is:
How many passes are required to sort the following elements using insertion sort?
16, 13, 19, 4, 1, 29, 31, 45
Which of the following sorting algorithms is not an in-place algorithm?
What is the disadvantage of the dijkstra algorithm?
The recursive formula used for finding the factorial of a number is:
Which algorithm can be used to solve the single source shortest path problem?
Which of the following is an application of Breadth-First Search (BFS)?
Consider the following iterative code snippet to find the largest element:
int get_max_element(int *arr,int n)
{
int i, max_element = arr[0];
for(i = 1; i < n; i++)
if(________)
max_element = arr[i];
return max_element;
}
Which of the following lines should be inserted to complete the above code?
Consider the following iterative implementation used to reverse a string:
#include<stdio.h>
#include<string.h>
void reverse_string(char *s)
{
int len = strlen(s);
int i, j;
i = 0;
j = len - 1;
while (i < j)
{
char tmp = s[i];
s[i] = s[j];
s[j] = tmp;
i++;
j--;
}
}
Which of the following lines should be inserted to complete the above code?
OnSite
1 Openings
FullTime
Posted 17 days ago