Programming puzzles: processing lists!
|
04-20-2017, 09:35 PM
(This post was last modified: 04-20-2017 09:36 PM by pier4r.)
Post: #10
|
|||
|
|||
RE: Programming puzzles: processing lists!
Challenge #1a userRPL, 50g.
more functions: http://www.hpmuseum.org/forum/thread-8114.html I noted that the test failed almost immediately and so I started to estimate the probabilities. If I'm not mistaken, the test will succeed - given a random list - with probability: 1/2 for 2 elements 1/4 for 3 elements 1/8 for 4 elements 1/2^(n-1) for n elements so it is very likely to fail. Therefore I made the random input list smaller , only 10 elements, and I let the test execute 2048 times. I should expect around 4 successes. let's see how long it takes to compute all this. Code:
Wikis are great, Contribute :) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)