Problem
The library currently supports vector, stack, and queue, but several foundational C++ sequence containers are missing. These are heavily used in competitive programming and systems design.
Missing Containers
| Container |
C++ Equivalent |
Description |
deque |
std::deque<T> |
Double-ended queue, O(1) push/pop from both ends |
list |
std::list<T> |
Doubly linked list, O(1) insert/delete anywhere |
forward_list |
std::forward_list<T> |
Singly linked list, memory efficient |
array |
std::array<T, N> |
Fixed-size array with STL-style interface |
Expected API (Example for deque)
from pythonstl import deque
d = deque()
d.push_front(1)
d.push_back(2)
d.pop_front()
d.pop_back()
print(d.front(), d.back(), d.size())
Checklist
Notes
deque should be the priority as it is used internally by queue and stack in C++ STL.
- All containers should follow the same naming conventions used in existing containers.