Weekend Programming Challenge Issue #2 Late Entry


Image

Peter Konecny needed more than weekend to find proper solution to our Issue#2 problem

But instead to go to the brute force permutation route, he did some deep analysis on the problem and made solution which works in real time even on arrays with 100 000 elements!

Enjoy: https://github.com/OLIMEX/WPC/blob/master/ISSUE-2/SOLUTION-7/shuffle.py

1 Comment (+add yours?)

  1. Iain Cunningham (@IainIsm)
    Apr 04, 2013 @ 12:30:37

    I love the idea behind the algorithm, but I can’t get it to work, I get a runtime error on line 38 using ideone.com: http://ideone.com/amu7ub

    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: