Monday, December 31, 2012

Get All Possible Substrings of A String

I had to write this by hand at an interview with a local company. Pretty sure I aced it.

Given a string, write a method to return all possible substrings of the string.

Solution: Complexity O(n^2).

2 comments: