Solving the Remote Keyboard Traversal Problem: Navigating the Grid Efficiently
The Problem Write a program to search a movie title using screen keyboard with minimal traversal (e.g. Searching for a title Using ROKU/Apple TV remote on Netflix). Input keyboard can have all the characters in any order. Given : Movie title and initial position of remote selection We have five buttons in remote: UP, DOWN, LEFT, RIGHT, OK Keyboard: Input remote could be like this (as it buttons could be in any order) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z For Example: Initial position of remote: A Movie title: BHE Result: RIGHT, OK, RIGHT, DOWN, OK, RIGHT, RIGTH, UP, OK (Right answer) Result: RIGHT, RIGHT, LEFT, OK, RIGHT, DOWN, OK, RIGHT, RIGTH, UP, OK (incorrect, not the shortest one) this problem can be categorized as a grid navigation or grid traversal problem ...