title: Adobe Interview: What data structure to use for storing thousands of points (x,y) to perform certain operations faster
body: <p>We have to store thousands of points (x,y,c) c here is for color of that point. Mainly its related to pixels on the screen. We have to perform operations :
  given x = i, we have to change color of all the points having x = i.
  Similary, given y = i, we have to change color of all the points having y = i.</p>
  
  <p>I proposed a solution of 2D-matrix. Then Separate Hash table for x and y coordinates.
  Then he asked me for even better solution.
  What better combinations of data structures can we use ? </p>