Let a point lie on a Cartesian coordinate plane given below such that and are any real numbers.
Assume an array of size 8.
Let each pair of the numbers represent a point such that value is and one is and there are points in total.
i-e: and but not .
In this case, the quadrant 3 is said to be most dense because it contains more points (i-e: 2) than any other while the quadrant 1 is least dense because it contains least number of points (i-e: 0).
Let the Array be the array of real numbers and and be the most dense and least dense quadrant numbers respectively.
Details and Assumptions:
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let G be the given array of size n and S be an array of size 4 to store the number of points in each quadrant. Following algorithm does the desired work.
The required value is min+max.