Each row, column & 3x3 box must contain the digits 1-9.
If the end cell on a line contains the digit X and the next digit along the line contains the digit Y then the cell at position X on the line must contain the digit Y.
This rule applies separately starting at each end of the line counting the end of the line as position 1, the next cell along as position 2, etc...
Note that the digit Y may also appear elsewhere on the line.
Solution code: digits in row 4