+ 1

Can anyone tell me what is binary search and binary search tree ???

Codes using the above would do !!!

19th Jan 2017, 7:33 PM
Siddharth Naithani
Siddharth Naithani - avatar
2 ответов
+ 3
"Binary Search" is a searching 'algorithm' in which searching of an element is done by partitioning the data structure (array/linked list) into equal halves and comparing the element with both the sides. This method of search should only be applied on a sorted data structure and is repeated until there are no further partition possible. "Binary Search Tree" on the other hand is a 'data structure' in itself. It is a sorted linked list structure where the elements are stored in such a way that all the elements on the left side of a node is smaller and on the right side of the node is greater than the element of that node itself. (In some cases, the opposite of it is also true). For further details you can refer to the links below: https://en.m.wikipedia.org/wiki/Binary_search_algorithm https://en.m.wikipedia.org/wiki/Binary_search_tree http://quiz.geeksforgeeks.org/binary-search/ http://www.geeksforgeeks.org/category/binary-search-tree/ PS- Hope it helps! Happy Coding :)
19th Jan 2017, 8:03 PM
Varnita Jha
Varnita Jha - avatar
+ 1
binary search is a search technique which can find a number in a sorted list O(log(n)) time. one the other hand binary search tree is a data structure to store data. this help in deletion of data, insertion and finding data.
19th Jan 2017, 8:02 PM
ashiqur rahman
ashiqur rahman - avatar