News for hackers. Stuff that matters.
Re:Show HN: Array with Constant Time Access and Fast Inserti... by kadoban on Tuesday September 03, 2019 @09:04PM (#20873019)
You've answered your own question implicitly. The address of the starting and ending element can change. You just define yourself where in the backing array the start/end are, and let them wrap around (use modular arithmetic for the indexes).
Re:Show HN: Array with Constant Time Access and Fast Inserti... by panda88888 on Tuesday September 03, 2019 @09:07PM (#20873040)
Thanks! DEQ implementation with circular buffer. :)

Edit: should have thought of that. Brain fart—-long day at work.

Re:Show HN: Array with Constant Time Access and Fast Inserti... by kadoban on Tuesday September 03, 2019 @09:14PM (#20873076)
Exactly! I really like this stuff, little clever ways to skip effort. Data structures and algos don't get enough love :)