Kabam interview question

boggle solver algorithm