Which one of the following can be termed as worst case for linear search?
Element to be searched is present somewhere in the middle of the array.
Element to be searched is present at 0th index of the array.
Element to be searched is present at the last index of the array.
Element to be searched is present at the last index of the array or Element to be searched is not present in the array.
Which of the following is correct in context of Binary Search?
Input data needs to be sorted in Binary Search.
Binary Search doesn't access the data elements in a sequential order.
In Binary Search, search is carried out in either half of the given input list.
All of the above.
In the mergesort algorithm, what is the running time of the merge operation?
O(log n)
O(n)
O(n log n)
O(n^2)
Which of the following sorting algorithm uses divide and conquer?
Merge Sort
Insertion Sort
Radix Sort
None of the above
What is the running time of Insertion Sort?
O(n2)
O(n log n)
O (n2+ log n)
O(n2 logn)
Which among the following sorting algorithm uses auxiliary storage to sort input data elements?
Insertion Sort
Counting Sort
Radix Sort
None of the above
the minimum number of comparisons required to find the maximum and minimum in an array of 100 elements are ____
198
150
148
199
Let the numbers 794, 332, 561, 342, 200, 607, and 893 be sorted using radix sort. What will be the sixth number in the sequence of numbers after sorting the second digit?
893
794
332
561
Which of the following is the correct recurrence relation related to the complexity of Binary Search?
T(n)=T(n/2)+O(n)
T(n)=T(n/2)+1
T(n)=2T(n/2)+O(n)
T(n)=2T(n/2)+1
Which of the following sorting algorithms has a running time of O(nlogn)?
Merge Sort
Insertion Sort
Counting Sort
None of the above
Answers
Answer:
Merge Sort Algorithm
Explanation:-
An array of Size ‘N’ is divided into two parts ‘N/2’ size of each. then those arrays are further divided till we reach a single element. The base case here is reaching one single element. When the base case is hit, we start merging the left part and the right part and we get a sorted array at the end. Merge sort repeatedly breaks down an array into several subarrays until each subarray consists of a single element and merging those subarrays in a manner that results in a sorted array. We repeatedly break down the array in two parts, the left part, and the right part. the division takes place from the mid element. We divide until we reach a single element and then we start combining them to form a Sorted Array.
1. Divide the problem into multiple subproblems.
2. Solve the Sub Problems. The idea is to break down the problem into atomic subproblems, where they are actually solved.
3. Combine the solutions of the subproblems to find the solution of the actual problem
4. Divide the unsorted array into subarray, each containing a single element.
5. Take adjacent pairs of two single-element array and merge them to form an array of 2 elements.
7. Repeat the process till a single sorted array is obtained.
For more refers to-
https://brainly.in/question/54370051?referrer=searchResults
https://brainly.in/question/26864217?referrer=searchResults
#SPJ2