October 18, 2023
October 18, 2023
October 18, 2023
###### UGC NET CS 2014 June-paper-2
October 18, 2023
 Question 2
Which among the following algorithm can’t be used with linked list?
 A Binary search B Linear Search C Insertion sort D Merge Sort
Question 2 Explanation:
→ Binary search increases the traversal steps per element in linked list just to find the middle element. This makes it slow and inefficient. Whereas the binary search on an array is fast and efficient because of its ability to access any element in the array in constant time.
→ Merge sort is often preferred for sorting a linked list. The slow random-access performance of a linked list makes some other algorithms (such as quicksort) perform poorly, and others (such as heapsort) completely impossible.
→ Insertion sort & Linear search can use linked list.
Note:But Binary search also can implement using linked list but it takes O(n) time complexity.
Question 2 Explanation:
→ Binary search increases the traversal steps per element in linked list just to find the middle element. This makes it slow and inefficient. Whereas the binary search on an array is fast and efficient because of its ability to access any element in the array in constant time.
→ Merge sort is often preferred for sorting a linked list. The slow random-access performance of a linked list makes some other algorithms (such as quicksort) perform poorly, and others (such as heapsort) completely impossible.
→ Insertion sort & Linear search can use linked list.
Note:But Binary search also can implement using linked list but it takes O(n) time complexity.