More fun with Arrays!

Computer Science Level pending

Let a point \(P=(x, y)\) lie on a Cartesian coordinate plane given above such that \( x \) and \( y \) are any real numbers.

Assume an array \( [12.5, -0.1, -11.01, 10, 0, -1, 1, -22.2] \) of size 8.

Let each pair of the numbers represent a point \( P \) such that \( 1^\text{st} \) value is \( x \) and \( 2^\text{nd} \) one is \( y \) and there are \(\frac{8}{2}=4\) points in total.

i-e: \( P_{1}=(12.5, -0.1), P_{2}=(-11.01, 10), P_{3}=(0, -1)\) and \(P_{4}=(1, -22.2) \) but not \(P(12.5, -11.01)\) or \(P(10, -1)\) or so.

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 \(m\) and \(l\) be the most dense and least dense quadrant numbers respectively. \[ \text{ What is } m+l \, ? \]

Details and Assumptions:

  • A point may repeat itself in the given array. Consider such repea- ted points as different and include them in your counting as well.
  • Points lying on either X-axis or Y-axis are not considered to be in any of the quadrants.

Problem Loading...

Note Loading...

Set Loading...