Finding elements in the array is a very easy problem, we can use linear search to find elements in O(N) time complexity.

Intuition:

- Divide the array into two-part, one of them will always be sorted.

2. Now if the sorted array is on the left side then compare the target with the mid and 0 th element to reduce the search space.

3. else if the sorted array is on the right side then compare the target with the mid and n-1 th element to reduce the search space.

**public int **search1(**final int**[] A, **int **B) { int **n =…**

- setup python using python distribution. we are going to use Anaconda.
- Check the python is install using the following command.

conda — version

Associate Software Engineer | JP Morgan & Chase