Programming puzzles: processing lists!
|
05-05-2017, 11:51 AM
(This post was last modified: 05-05-2017 12:19 PM by pier4r.)
Post: #71
|
|||
|
|||
RE: Programming puzzles: processing lists!
(05-01-2017 05:45 PM)DavidM Wrote:(04-28-2017 09:51 PM)pier4r Wrote: #6 (that is very similar to #10, my bad) So first I had to handle the case that the second dosubs returns a list of only one element, that \GSLIST does not like, If I understood your comments correctly (I love comments and I am a bit critical to code - especially using the stack - posted without them. Although better having the code than nothing), when the result is 0 then the processing returns valid. Therefore I add a 0 to the list returned by dosubs and GSLIST likes it. If I am not mistaken. The list { 5 5 5 5 5 6 6 6 6 6 } is returned as valid, but it is not. Also: { 1 2 3 1 2 3 } is valid (but it is not). Could you check if I messed up with your code? For the #21 I'm a bit surprised because I did not expect such timings. The compact version of werner handles correctly 50 lists of 100 elelemnts in 1.61 seconds. My longer program (you know, I don't like cryptic stack operations) handles the same workload in 1.35 seconds. Wikis are great, Contribute :) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)