# For up to date code:# https://github.com/codereport/bqn-code/blob/main/pwc/281-2.bqnConvert←48|-⟜'0'¨deltas←(⌽¨⊸∾)∾<˘2‿¯2⋈⌜1‿¯1IsValid←∧´1⊸≤∧8⊸≥Moves←{IsValid¨⊸/⥊𝕩+⌜deltas}MinKnightMoves←{end‿start←𝕨⋈○Convert𝕩1end{∨´𝕗⊸≡¨Moves𝕩?𝕨;(𝕨+1)𝕊Moves𝕩}⟨start⟩}# Tests•Show"g2"MinKnightMoves"a8"# 4•Show"g2"MinKnightMoves"h2"# 3