match the following:
1)Quick sort A)divide and conquer programming
2)Task scheduling B)Greedy programming
3) Merge sort C)Dynamic programming
4) prim's D)not stable
a) 1-b 2-a 3-c 4-d
b) 1-d 2-c 3-a 4-b
c) 1-d 2-c 3-b 4-a
d) 1-c 2-d 3-a 4-b
Answers
Answer:b
Explanation: Quick short is not stable. A sorting algorithm is said to be stable if it maintains the relative order of records in the case of equality of keys. QuickSort is an unstable algorithm because we do swapping of elements according to pivot's position (without considering their original positions).
Task scheduling is dynamic because is depends on the requirements of the task over each other. If a task(Say A) depends upon another task (Say B) the scheduling is done during runtime to get correct values(Task A is written before Task B).
Merge short is divide and conquer technique. We divide the list (array) into two halves and continue dividing each half until no further division can be done. Then we re join every division in orderly fashion. Hence shorting the list.
Prim's algorithm is greedy algorithm. Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit.
The answer is:
b) 1-d 2-c 3-b 4-a
1) Quick sort - d) not stable
Implying that the general request of equivalent sort things isn't saved.
2) Task Scheduling - c) Dynamic programming
It is a technique for taking care of a perplexing issue by separating it into an assortment of more straightforward sub problems.
3) Merge Sort - a) Divide and conquer programming
It works by recursively separating an issue into at least two sub-issues of the equivalent or related sort until these become basic enough to be fathomed straightforwardly.
4) prim's - b) Greedy programming
The calculation settles on the ideal decision at each progression as it endeavors to locate the general ideal approach to tackle the whole issue.