• retagged by
706 views

1 Answer

0 0 votes
If we use Hashing to store the array,then any number can be found in O(1).
Position:
Show:

Related questions

0 0 votes
2 2 answers
1.9k
1.9k views
dhruba asked Jun 5, 2023
1,904 views
Binary search is performed on a sorted array of n elements. The search key is not in the array and falls between the elements at positions m and m+1 (where 1 ≤ m < n). Ho...
0 0 votes
1 1 answer
883
883 views
dhruba asked Jun 5, 2023
883 views
Consider performing QuickSort on an array of n distinct elements. What is the probability that no comparisons will be made between the smallest and largest element?a. 1/n...
1 1 vote
1 1 answer
1.9k
1.9k views
radha gogia asked Jul 8, 2016
1,926 views
0 / \ 5 7 / \ / \ 6 4 1 3 \ 9Tree given in the form: (node value(left subtree)(right subtree))For tree given above: (0(5(6()())(4()(9()())))(7(1()())(3()())))Input forma...
0 0 votes
1 answers 1 answer
2.1k
2.1k views
radha gogia asked Mar 7, 2016
2,102 views
How many key comparisons are there , what is the lower bound and upper bound ? For calculating the lower bound , should we consider the case when the keys are all in non-...