Binary Search | Sorted Array |
Divide And Conquer | Iteration |
Search Interval | Target Element |
Mid-Point | Index |
It is an array where the elements are arranged in increasing order. | Algorithm that searches a sorted list or array by repeatedly dividing in half until the desired item is found. |
It is the repetition of a process in order to achieve a desired outcome, usually with the aim of approaching a goal in small steps. | A problem-solving strategy that involves breaking a problem into smaller sub-problems, solving them independently and combining their solutions. |
It is the element being searched for in the binary search algorithm. | It is the range of elements in which the binary search algorithm looks for the target element. |
It is a position in an array where an element is located. | It is the point in the search interval that divides it into two equal halves. |
Comparison | Time Complexity |
Space Complexity | Binary Search Tree |
Balanced Binary Search Tree | Height |
Leaf | Node |
It is the amount of time taken by an algorithm to run as a function of the size of the input. | It is the act of checking if two values are equal, greater than or less than each other. |
It is a data structure that allows fast searching, insertion and deletion of elements, using the binary search algorithm on a sorted tree. | It is the amount of memory used by an algorithm to run as a function of the size of the input. |
It is the length of the longest path from a node to a leaf in a binary search tree. | It is a binary search tree where the heights of the two subtrees of any node differ by at most one. |
It is a fundamental unit of a binary search tree that contains a value and links to its children. | It is a node in a binary search tree that has no children. |
Traversing | In-Order Traversal |
Pre-Order Traversal | Post-Order Traversal |
It is a traversing method for binary search trees where the left subtree is recursively traversed, followed by the root, and then the right subtree. | It is the process of visiting all the nodes in a binary search tree in a specific order, such as in-order, pre-order and post-order. |
It is a traversing method for binary search trees where the left and right subtrees are first recursively traversed, followed by the root. | It is a traversing method for binary search trees where the root is visited first, followed by the left and right subtrees recursively. |