Which of the following properties is associated with a queue?
What formula gives the sum of the first n natural numbers?
How many bits are needed to represent a character in a character set of size X?
What is the asymptotic time complexity to insert an element at the second position in a linked list?
Kruskal's algorithm is a type of ______
Which sorting algorithm is best suited to sort a huge database on a fixed-length key field?
Consider the following recursive function fun(x, y). What is the value of fun(4, 3)?
int fun(int x, int y)
{
if (x == 0)
return y;
return fun(x - 1, x + y);
}
What is the output of the following recursive function?
void my_recursive_function(int n)
{
if(n == 0)
return;
printf("%d ",n);
my_recursive_function(n-1);
}
int main()
{
my_recursive_function(5);
return 0;
}
Complete the program to compute the shortest path between vertices using the Floyd-Warshall algorithm.
Consider the following recursive implementation used to reverse a string:
void recursive_reverse_string(char *p, int l, int r)
{
if(l < r)
{
char temp = p[l];
p[l] = p[r];
p[r] = temp;
recursive_reverse_string(p, l+1, r-1);
}
}
OnSite
1 Openings
FullTime
Posted 17 days ago