• closed by
520 views
1 1 vote
closed with the note: Duplicate of : https://gateoverflow.in/116846/ds

Consider a data type whose elements are integers and whose operations are INSERT, DELETE, and FINDCLOSEST, with FINDCLOSEST(y) defined to be some element x in the current set such that|x-y| ≤ |xi-y| for all xi in the current set. Let

T = max ( T_{INSERT} ,T_{DELETE}, T_{FINDCLOSEST} )

where T_{op} denotes the worst-case time complexity for the given operation OP. Which of the following data structures would be best to use in order to minimizeT?

(A) A sorted list

(B) An unordered list

(C) An implicit heap

(D) An AVL tree

Position:
Show:

Related questions

2 2 votes
1 1 answer
924
924 views
smartmeet asked Feb 8, 2017
924 views
The intended purpose of this code is to precompute all the primes less than N. When it is finished executing, for r ∈ [2, N), bits[r] is supposed to equal 1 if and only i...
0 0 votes
2 2 answers
915
915 views
smartmeet asked Feb 7, 2017
915 views
Consider a data type whose elements are integers and whose operations are INSERT, DELETE, and FINDCLOSEST, with FINDCLOSEST(y) defined to be some element x in the current ...
0 0 votes
1 1 answer
970
970 views
smartmeet asked Feb 8, 2017
970 views
Which of the following statements is FALSE?(A) Each thread has own stack(B) Starvation implies deadlock(C) Smaller page size increases the page table size(D) User level p...
0 0 votes
1 1 answer
621
621 views
smartmeet asked Feb 8, 2017
621 views
There are two examinations rooms A and B. If 10 students are sent from A to B, then the number of students in each room is the same. If 20 candidates are sent from B to A...