Version 2: Algorithm For getting distances from the first Element

Getting all the first key neighbours from the first column where colors
are input till last column where colors are present done.
Pending : 1. Comparing both the arrays
2. Error when key is > 389 and <399