Solve using fractional knapsack: M=20, n=4 P= (3, 10, 15, 5) W= (5, 13, 12, 8).
SIKSHAPATH Latest Questions
Minni
Asked: October 17, 2022In: Computer Science
When can we say that a sorting algorithm is stable and in-place? Categorize various sorting algorithms in two categories: stable and not-stable.
Minni
Asked: October 17, 2022In: Computer Science
For each of following Divide and Conquer algorithms, state the corresponding recurrence relation, and state a runtime bound (using O) (you do not need to show work for solving the runtime recurrence). A. If you solve 7 sub-problems of size n /7 ...
Minni
Asked: October 17, 2022In: Computer Science
Why dynamic approach is preferred over greedy technique?
Minni
Asked: October 12, 2022In: Computer Science
Define power function. Write a code in C/C++ to calculate power function in O(logn) time complexity.
Minni
Asked: October 12, 2022In: Computer Science
Q.1 What is meant by Greatest Common Divisor? Write an algorithm to compute the greatest common divisor(GCD) of two numbers.