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
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?
What is the example of polymorphism?
What is methods in oop?
What is byval and byref? What are differences between them?
What is abstraction in oops?
What are functions in oop?
What does I oop mean?
What are the advantages of polymorphism?
What is abstraction and encapsulation?
what are the realtime excercises in C++?
What is the difference between inheritance and polymorphism?
What is static in oop?
What do you mean by variable?
What causes polymorphism?
Explain virtual inheritance?