solution to king coding challenge get shorty