Binary Search SIG-ASN
Binary Search SIG-ASN
SEARCH
Introduction &
Implementation
Q. Check if a value is present in the array
Linear Search : sequentially checks each
Iterative
Recursive
Iterative Method
Recursive Method
Binary v/s Linear
Binary Search is the most efficient
the array.
Binary Search can only be
some
Questions!
Q 1: Upper & Lower Bound
Binary Search.
Theory:
gives back the original number itself. Binary search helps us to find
the square root in 0(logN) where N is the number whose square root
is to be found.
Q 3: Arranging Coins
You have N coins and you want to build a staircase