HN user

vmanor

2 karma
Posts0
Comments1
View on HN
No posts found.

Stupid me tried to start an hour before it ended, found out about it at 4:30 and didn't get home until 5:00. I don't really do these competitions so took me about 2 1/2 hours but still those guys are fast. Here are my thoughts on the problems:

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.