title: Shortest Path to accomplish given scenario
body: <p>I was asked in an interview to code the following scenario</p>
  
  <p>A tv has 0-450 channels but the remote buttons 2,5,8,9 have malfunctioned so write 
  a program to get input from the user and traverse that channel through the shortest path</p>
  
  <p>EXAMPLE:</p>
  
  <blockquote>
    <p>47 -> no need to traverse button 4,7 is available</p>
    
    <p>45 -> 44+1 output from which channel to traverse and how many traversal
    required to reach 45.</p>
    
    <p>55 -> 55 can be reached from 47 only coz 54 has 5. |||ly (50-55) has 5
    in it so again 48 and 49 has 8 and 9 respectively.</p>
  </blockquote>
  
  <p>I've tried my logic but not even able to code in such a way it is best shortest path for all input PLEASE help me with the logic or show me the program.</p>