Which one is faster?
A binary search of an orderd set of elements in an array
or
a sequential search of the elements.
Answer Posted / srikanth
binary search if of order log n where as sequential search
is of order n
binary search is faster..
| Is This Answer Correct ? | 36 Yes | 2 No |
Post New Answer View All Answers
Now you are given an array of a characters (both ASCII and Kanji) and, an index into the array. The index points to the start of some character. Now you need to write a function to do a backspace (i.e. delete the character before the given index).
How would you use qsort() function to sort the name stored in an array of pointers to string?
How many passes are required in bubble sort?
In rdbms, explain what is the efficient data structure used in the internal storage representation?
How many pointers are necessary to implement a simple linked list?
What is a queue in data structure?
What is the types of data structure?
What is an externalizable interface?
What is a Breadth First Search? Give a few of its applications.
Explain what are the major data structures used in the rdbms?
Explain what is linear search?
What is a data structure node class?
Does hashmap sort automatically?
What is the advantage of circular linked list?
What differences exist between hashmap and hashtable?