**Objective:** Write an algorithm to find an element in 2-dimensional array where rows and columns are sorted respectively.

**Input:** A two dimensional sorted array, arrA[][].

**Output: **True or false based on whether the element exists and its location

**Approach:**

- Start from the right top corner, say
is the matrix element;**ele** - If ele>number -> move left
- If ele<number -> move down
- If you cant move further to find the number , return false

**Code:**

The Movement : 4->9->16->15->The 15 present in 2D array a ??? :true The Movement : 4->9->8->7->6->The 5 present in 2D array a ??? :false The Movement : 4->9->16->20->19->The 19 present in 2D array a ??? :true The Movement : 4->9->16->20->The 25 present in 2D array a ??? :false