17 lines solution, dfs (C++) : https://leetcode.com/discuss/58535/17-lines-solution-dfs-c
80ms C++ solution : https://leetcode.com/discuss/58916/80ms-c-solution
The first one takes more time, but I can see their algorithms for calculating and extracting each word are almost the same.
The funny thing is I put a counter into their recursive function, and the first one has far more less calls. Why is that? Besides, even though it calls much less, the time it takes is much longer. Why is that?