LinkedIn interview question

Segment a long string into a set of valid words using a dictionary. Return false if the string cannot be segmented. What is the complexity of your solution?

Interview Answers

Anonymous

10 Aug 2011

Better yet, read my blog. This question has been retired. thenoisychannel.com/2011/08/08/retiring-a-great-interview-problem/

5

Anonymous

16 Jul 2011

Use dynamic programming, search for string segmentation online. Worst case complexity is 2^N.