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
Can a varargs method be overloaded?
Explain the concepts involved in Object Oriented programming.
What is the main purpose of inheritance law?
Why is there no multiple inheritance?
what is the 3 types of system development life cycle
Which language is pure oop?
What is protected in oop?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
Why do we use class in oops?
What is byval and byref? What are differences between them?
Why do we use polymorphism in oops?
What is the highest level of cohesion?
What is the importance of oop?
Why polymorphism is used in oops?
What is the purpose of enum?