recategorized by
1,090 views

1 Answer

Best answer
3 votes
3 votes
A. Is correct as S1 is only true.

In an ordered array we need to reorder everytime we insert an element, (note that deletion does not effect as after deletion the array is already ordered)

If the number of deletions are low which means the quality of ordered array is not used very much instead the overhead of insertion is frequent, hence its better to use unordered array.

S2 is false as both take equal time for insertion and deletion in averge case (assuming there is no further structure based use of data). Max heap takes O (log n) for even worse case of insertion and deletion, whereas BST can take O (n) in worst case.
selected by
Answer:

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
1 answer
2
Pankaj Joshi asked Jan 25, 2017
440 views
Consider we have an algorithm which generate preorder of any tree in Ο(log n) time, we have to create a Binary Search Tree with n distinct element. Which of the followin...
2 votes
2 votes
1 answer
3