Deque icon indicating copy to clipboard operation
Deque copied to clipboard

Rotate function

Open nojaf opened this issue 6 years ago • 3 comments

Would a rotate function be useful? Similar how python has it.

nojaf avatar Dec 14 '18 12:12 nojaf

Do you need it?

StephenCleary avatar Dec 15 '18 23:12 StephenCleary

There was one day in the Advent of code that I had a usecase for it. Thought it could help others as well if it is added out of the box. Feel free to disagree and close if you think otherwise.

nojaf avatar Dec 16 '18 09:12 nojaf

I think I know what you're referring to, the marble game. the DE queue was great to solve that. As for the rotate, as long as you kept your current marble in the front or back, a simple call like d.AddToBack(d.RemoveFromFront()); or vice versa solved the issue. Rotate may be overkill. Great suggestion though.

jzukowski avatar Dec 21 '18 20:12 jzukowski