I want to come up with an arbitrary string, and feed it into my program to see if there exists two strings that I can concatenate to get the target string. What kind of data structure and algorithm would be good for this? I'm thinking a sorted array would be good, and then walk down the list, binary searching for the suffix/prefix needed. That would be O of NlogN I think. 
Data structure/aglorithm for strings to see if there exists two strings you can concatenate to get a target?
algorithms;data structures;strings