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
How many human genes are polymorphic?
What is inheritance in simple words?
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
Is this job good for future? can do this job post grduate student?
Can an interface inherit a class?
What does no cap mean?
What is the difference between abstraction and polymorphism?
Why is there no multiple inheritance?
Why do we use polymorphism?
to find out the minimum of two integer number of two different classes using friend function
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).
Is abstract thinking intelligence?
What are the components of marker interface?
What is the significance of classes in oop?