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 abstraction 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 is oop useful?
When not to use object oriented programming?
can we make game by using c
What is destructor example?
What is oops and its features?
What is the point of polymorphism?
2. Give the different notations for the class.\
What are the 3 principles of oop?
• What are the desirable attributes for memory managment?
What is use of overloading?
What is encapsulation and abstraction? How are they implemented in C++?
What is the oops and benefits of oops programming?
What is difference between pop and oop?