should we use linear search or binary search if elements
are placed in random order or mixed?in both cases? i need a
little bit detail ans?thnks
Answer Posted / pavan
binary search tecqnique is applicable only to sorted
elements because we find the mid value and then cmp it with
the key and if the key is greater than the mid value then
we scan on towards the right else towards the left
so,hencefort itwe should make use of linear search when the
elements r not sorted
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What is inheritance write a program to show use of inheritance?
What is static in oop?
Can a varargs method be overloaded?
What is polymorphism explain its types?
Is data hiding and abstraction same?
i got a backdoor offer in process global,Bangalore..Can i work with it?
Explain the advantages of inheritance.
How do you achieve runtime polymorphism?
What are the 4 pillars of oop?
What does I oop mean?
What is a class and object?
Why do we use encapsulation in oops?
What is oops in simple words?
What is a class oop?
Can we define a class within the interface?