Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I implemented the "2-level rotated array" structure a few years ago, which isn't designed to be used as a deque, but is at least less pathological than this (O(1) push_back/pop_back, O(sqrt(n) push_front/pop_front/insert/delete).

https://github.com/senderista/rotated-vec



Oh, fantastic!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: