2 karma · joined Sep 4, 2009 (17y ago) · 1 submissions
comment 17y ago · link · parent
A) Trick was to reverse the problem. Instead of checking if different permutations of the test cases matched the dictionary, see if you can build each dictionary word out of the test case. My python solution finishes the large input in about 6s.
B) Nothing tricky here, like others said it just required some debugging.
C) A dynamic programming problem. Work backwards along the reference string finding the solution to each 'subproblem' using the solution for the character following it. Ran the large input in 0.5s.