Zulily interview question

Given Netflix style keyboard
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,-

and controller on which you can go up, down, left, right

if a user enters a movie name then find out how would you reach that letter in the keyboard for simplicity enter key can be replaced with '!' mark

As a reference a 2D String array is given as key board

example : input -> "up"  output -> "DDDD!U!"
Comments (1)