Weekend Programming Challenge – Week #24 Solutions


We got 13 solutions and they are on GitHub https://github.com/OLIMEX/WPC/tree/master/ISSUE-24

  • 5 in C
  • 4 in Python
  • 2 in C#
  • 1 Perl
  • 1 Prolog

5 Comments (+add yours?)

  1. Mateusz
    Sep 16, 2013 @ 14:54:25

    Do you check the correctness of the submitted solutions?


  2. kantal
    Sep 16, 2013 @ 19:33:09

    I checked the Python and C codes:
    sol1: Python, correct, recursive, very slow, extra: it creates the partitions.
    sol10: Python but fast!!!, correct, recursive, extra: using cache technic, calculating up to 1000, creates statistics.
    sol12: Python, correct, recursive, slow.
    sol13: Python, correct, recursive, slow (mine:-).

    sol3: C, not correct from 6.
    sol4: C, very fast, recursive, calculating up to 405, extra: using cache technic.
    sol8: C, very fast, non recursive, calculating up to 416, extra: using cache technic.
    sol9: C, slower than other C codes(but faster than my Python code:), recursive.
    sol11: C, slower than other C, recursive, calculating up to 500, extra: it creates the partitions.


  3. Spas
    Sep 16, 2013 @ 20:36:41

    Caching is a good idea. I thought of adding some precomputed values (up to 49 are readily available online).


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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: