add solution for length of last world problem of leet code