Explain what is binary search?
Answer / Akshya Dixit
Binary search is an efficient algorithm used for searching a sorted array or linked list. It works by repeatedly dividing the search interval in half. If the value of the middle element matches the target, it returns the index. Otherwise, it continues with the left or right subarray depending on whether the target is less than or greater than the middle element.
| Is This Answer Correct ? | 0 Yes | 0 No |
what is Singly Linked list?
How will you reverse Linked List.
Why is data structure needed?
Differentiate between set and map.
Explain quick sort and merge sort algorithms.
When will we get ArrayStoreException?
How do you define a set?
What are the different types of collections?
Which is better arraylist or linkedlist?
What is difference between treeset hashset linkedhashset?
What is homogeneous array?
Tell me can the size of operator be used to tell the size of an array passed to a function?