Weekend Programming Challenge Issue #3 – Results


We got 16 solutions this weekend, written in 6 languages:

1 solution in C++
1 solution in AWK
1 solution in Basic
2 solutions in C
2 solutions in Lua
9 solutions in Python

The solutions are uploaded on GitHUb, in the readme are my comments https://github.com/OLIMEX/WPC/tree/master/ISSUE-3

There are several very small and compact solutions made in Python, well done!

Solution-16 approach is to work first with numbers (based on the ASCII code) than to compare strings, but does this improve the speed?

1 Comment (+add yours?)

  1. Lukasz Pulka
    Apr 09, 2013 @ 16:10:45

    Unfortunattely comparing sums, does not improve speed.

    I have evaluated most of the python solutions and Lua solution(solution-16), which is much slower than my python (solution-10). Most of the solutions has O(n^2) computational complexity.

    For small quantity of input words it does not matter, however when number of input words increases it really does matter!. My test vectors where dictionaries with 75k to 250k words(each in single line). I found that python dictionaries are really powerful, and well optimised.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: