Awesome q2a theme
0 votes
8 views

Which of the following operations can be performed in $O(logn)$ time or faster on a sorted array $A$?($n$ denotes the size of array)

  1. Search$(A, x)$
  2. Find-Minimum$(A)$
  3. Delete$(A, x)$

Choose the correct option

  1. A, B & C
  2. B & C
  3. A & B
  4. A & C
in Others by (53 points) | 8 views

1 Answer

0 votes
A will take logn time using binary search.
B is O(1), as the array given is sorted.
C is O(n), as even though we can find the element in O(logn), we’ll have to move all the other elements after deletion.
by (364 points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users Jan 2020
  1. shashin

    1262 Points

  2. Deepakk Poonia (Dee)

    346 Points

  3. Vimal Patel

    343 Points

  4. Debapaul

    265 Points

  5. Satbir

    194 Points

  6. Pratyush Priyam Kuan

    158 Points

  7. tp21

    151 Points

  8. SuvasishDutta

    151 Points

  9. pranay562

    142 Points

  10. DukeThunders

    97 Points

Monthly Top User and those within 60% of his/her points will get a share of monthly revenue of GO subject to a minimum payout of Rs. 500. Current monthly budget for Top Users is Rs. 75.
3,085 questions
1,538 answers
9,232 comments
89,827 users