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 destructor example?
How is polymorphism achieved?
What is class and object in oops?
What is persistence in oop?
What is variable example?
Explain virtual inheritance?
Can you explain polymorphism?
Why is polymorphism needed?
What is the oops and benefits of oops programming?
How do you answer polymorphism?
Is html an oop?
Why do we use encapsulation in oops?
What does and I oop mean?
What are the 4 main oop principles?
class type to basic type conversion