Compass interview question

Knight on a phone dial pad. It's a dynamic programming question.