What is the worst case time complexity of insertion sort where position of the data to be inserted is calculated using binary search?

A | N |

B | NlogN |

C | N^2 |

D | N(logN)^2 |

GATE Exam | Aptitude Questions | GATE Syllabus | GATE Result | Mock Test | GATE Preparation

0 votes

What is the worst case time complexity of insertion sort where position of the data to be inserted is calculated using binary search?

A | N |

B | NlogN |

C | N^2 |

D | N(logN)^2 |

0 votes

C

N^2

Applying binary search to calculate the position of the data to be inserted doesn't reduce the time complexity of insertion sort. This is because insertion of a data at an appropriate position involves two steps: 1. Calculate the position. 2. Shift the data from the position calculated in step

N^2

Applying binary search to calculate the position of the data to be inserted doesn't reduce the time complexity of insertion sort. This is because insertion of a data at an appropriate position involves two steps: 1. Calculate the position. 2. Shift the data from the position calculated in step

- All categories
- Computer Science & Information Technology 452
- Mathematics 80
- Aptitude Questions 114
- GATE 95
- Online Aptitude Test 6
- Gate Exam 23
- Gate Syllabus 6
- Gate Preparation 35
- Gate Coaching 14
- Online Registration 20
- Electronics and Communication (EC) 0
- Electrical Engineering (EE) 3
- Civil Engineering (CE) 0
- Mechanical Engineering (ME) 2
- Aerospace Engineering (AE) 0
- Agricultural Engineering (AG) 0
- Architecture and Planning (AR) 0
- Biotechnology (BT) 0
- Chemical Engineering (CH) 1
- Chemistry (CY) 0
- Ecology and Evolution (EY) 0
- Geology and Geophysics (GG) 0
- Instrumentation Engineering (IN) 0
- Mining Engineering (MN) 0
- Petroleum Engineering (PE) 0
- Physics (PH) 0
- Production and Industrial Engineering (PI) 1
- Textile Engineering and Fibre Science (TF) 0
- Engineering Sciences 1
- Life Sciences 2
- Mathematics (MA) 0