title: Mapping (x,y) to single number value
body: <p>I want a function to map the (x,y) value to a single number value and corresponding reverse mapping in Java.</p>
  
  <p>For example (2,34) should map to some value 100 and if we have 100 we should be able to find (2,34).</p>