Finding neighbor in 2D array using delta

77
November 28, 2017, at 03:47 AM

I was going through one of the online courses for Data strudcture and Algorithms. There I saw saw a topic "Delta based two dimensional array search". Which describes below:

  • A techinque to search adjoing array elements of four directions in coordinates of two directions.
  • Delta value is an array that saves coordinates of four direction in coordinates as well as difference between X and Y.
  • Delta value is employed to approach the elements located up down left right side of certain element.

As per m understanding, its basically searching neighbors in four directions of a given array. I found couple of good answers on stack overflow:

  • Finding the neighbors of 2D array
  • Finding 8 neighbours in 2d Array
  • Finding a neighbour in a 2d array
  • More efficient way to check neighbours in a two-dimensional array in Java
  • Finding neighbours in a two-dimensional array

    However I am not clear with the 2nd point "Delta value is an array that saves coordinates of four direction in coordinates as well as difference between X and Y". Can anyone explain what does this point means? Also the stack overflow links that I mentioned above serve the purpose? Thank You

READ ALSO
Groovy: parse string with special symbols

Groovy: parse string with special symbols

I have this description that I get from user: sample description with special symbols >

105
Reading big-endian binary files containing mixed types

Reading big-endian binary files containing mixed types

How should I read a big-endian binary file containing mixed types in Python?

104
I need to get list of details from top to bottom after clicking + icon in jasper i report [on hold]

I need to get list of details from top to bottom after clicking + icon in jasper i report [on hold]

Now I grouped the details according to headingBut when I click + icon it expand bottom to up

69
Keep specific Annotation with proguard

Keep specific Annotation with proguard

I have two types of annotation in my project: Annotation1 and Annotation2Both are runtime annotations

98