Programming puzzles: processing lists!
|
06-12-2017, 10:26 PM
(This post was last modified: 06-13-2017 08:16 AM by pier4r.)
Post: #145
|
|||
|
|||
RE: Programming puzzles: processing lists!
(06-12-2017 10:19 PM)DavidM Wrote: Explode/roll/implode would work ok for an argument of 1/-1, but you'd have to loop the rolls for other numbers. Once list sizes get into the hundreds, rolls start to slow down. Try the "roll" method on a list of 1000 items rotated by 500 (or -500). How does it do? LROT handles that in about .19 seconds. Understood, I thought it was always quite quick. Then Lrot seems to be effective on a big chunk of rotations but not many little ones. Good to know. The test with lists of 1000 elements is still running, over an hour now. I'll be interested in the results. Wikis are great, Contribute :) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)