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 / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many human genes are polymorphic?

558


Can main method override?

574


what type of questions

1686


What is polymorphism explain?

669


Which language is pure oop?

537






Why polymorphism is used in oops?

573


why reinterpret cast is considered dangerous?

1886


Can you inherit a private class?

626


Can you name some types of inheritance?

627


What is advantage of inheritance?

672


Why is oop useful?

591


Why is static class not inherited?

586


What is object in oop?

667


What is destructor in oop?

611


write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

1775