Forward Interview Question

Given a 2D array representing a keyboard and a string, find the shortest path to type the string on the keyboard.