Two dimensional array - update certain poistion
<p>I have a two dimensional array and also have the start and end point. The array is initialized to zero and i have to update from the start to end position with one. What is the best algorithm to do it ? </p>

<p>For example if start and end position are (2,2) and (4,2) i need to start updating the values from 2,2 and end at 4,2. Rest of the array should be zero.</p>
