I have recently played participated in Olimex Weekend Programming Challenge (http://olimex.wordpress.com/2013/04/05/weekend-programming-challenge-issue-3/).
I have coded my solution in Python, and created custom C module to speed up string decomposition.
I like solving puzzles and I have great fun trying to make my code as fast as possible played with sets and dictionaries and found that dictionaries are little bit faster then sets (I was using Python 2.7). To spot the difference I used input file with 221k rows.
|excution time [s]|
I have performed some tests with various test vectors, to see how the algoritm behaves when input data size changes.
As you can see execution time raises linearly with the number of characters in the input file.
You can see the source code of my soulution at: https://github.com/OLIMEX/WPC/tree/master/ISSUE-3/SOLUTION-10