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
Answers were Sorted based on User's Feedback
Answer / indira
We have to use Linear Search only when elms r in random or
mixed .
In order to use Binary Search u have to sort these elems
whose order of complexity is n2.
so its better to use linear search whose complexity is of o(n)
| Is This Answer Correct ? | 14 Yes | 1 No |
Answer / 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 |
tel me oops defination in single line
Can we create object of interface?
write a short note on Overloading of Binary Operator?
What is encapsulation in ict?
why freind function takes more parameter than normal member function in c++?
What is polymorphism what are the different types of polymorphism?
What is the use of unnamed namespaces in OOPS? The only advantage I know is that they dont need the scope resolution operator while accessing them. I want to know some other advantages of unnamed namespaces...
1. Strong name 2. how to prevent a class from being inherited 3. delegates 4. default modifier for interface 5. default modifier for class 6. base class for exception 7. diff bet trigger and view in sql 8. how to exchange values from one page to another page 9. can multiple catch block ll be executed at same time 10. can u store different data types in an array & array list 11. when we ll use trigger 12. try,catch,finally usage
What is meant by multiple inheritance?
What is Virtual Keyword?
i got a backdoor offer in process global,Bangalore..Can i work with it?
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?