Which algorithm is more efficient in constructing the minimum spanning tree of a given graph: Prim’s Algorithm or Kruskal’s Algorithm and why?
SIKSHAPATH Latest Questions
Analyse the algorithm (in terms of both time and space) of subset sum problem using dynamic programming technique. Also write down the part of mentioned algorithm that contributes most towards the time and space complexity.
A networking company uses a compression technique to encode the message before transmitting over the network. Suppose the message contains the following characters with their frequency: Read more
Solve the activity selection problem by sorting the activities according to increasing finish times:
Solve using fractional knapsack: M=20, n=4 P= (3, 10, 15, 5) W= (5, 13, 12, 8).
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 ...Read more
Solve using fractional knapsack: M=20, n=4 P= (3, 10, 15, 5) W= (5, 13, 12, 8).
When can we say that a sorting algorithm is stable and in-place? Categorize various sorting algorithms in two categories: stable and not-stable.
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 ...Read more
Why dynamic approach is preferred over greedy technique?