###### UNIX-Operating-System

October 18, 2023###### UGC NET CS 2014 June-paper-2

October 18, 2023# Nielit STA [02-12-2018]

Question 2 |

Which among the following algorithm can’t be used with linked list?

Binary search | |

Linear Search | |

Insertion sort | |

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.

→ 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.

Correct Answer: A

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.

→ 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.

Subscribe

Login

0 Comments