feat add circle_queue
This commit is contained in:
parent
f11904132f
commit
e3fd80811a
@ -37,6 +37,12 @@ public:
|
||||
return queue_.get(head_);
|
||||
}
|
||||
|
||||
T &Back()
|
||||
{
|
||||
ASSERT(!empty());
|
||||
return queue_.get((tail_ + LEN) % (LEN + 1));
|
||||
}
|
||||
|
||||
void Pop()
|
||||
{
|
||||
ASSERT(!empty());
|
||||
|
Loading…
x
Reference in New Issue
Block a user