A machine took 400 seconds to sort 400 names using bubble sort. In 1600 seconds, it can approximately sort how many names?
What problem is the Ford-Fulkerson algorithm used to solve?
What is the main limitation of Selection sort?
In a binary tree, certain null entries are replaced by special pointers that point to nodes higher in the tree for efficiency. These special pointers are called?
Which sorting algorithm is the most appropriate for a given situation?
Optimal page replacement algorithm
What is the result of the recurrences which fall under the first case of the Master's theorem, where the recurrence is given by T(n) = aT(n/b) + f(n) and f(n) = n^c?
The pre-order traversal of a binary search tree is given by 12, 8, 6, 2, 7, 9, 10, 16, 15, 19, 17, 20. Then the post-order traversal of this tree is:
Consider the following iterative implementation to find the sum of digits of a number:
#include<stdio.h>
int sum_of_digits(int n)
{
int s = 0;
while(n != 0)
{
_________;
n /= 10;
}
return s;
}
int main()
{
int n = 123;
int ans = sum_of_digits(n);
printf("%d",ans);
return 0;
}
Which of the following lines should be inserted to complete the above code?
OnSite
1 Openings
FullTime
Posted 17 days ago