Searching a 2D array for a range of values in java
- by Paige O
I have a 2^n size int array and I want to check if an element exists that is greater than 0. If the element exists, I want to divide the array by 4 and check if the coordinates of the found element are in the 1st, 2nd, 3rd or 4th quadrant of the array.
For example, logically if the element exists in the first quadrant it would look something like…