Microsoft interview question

solve grab scrabble