mirror of
https://github.com/krahets/hello-algo.git
synced 2025-12-16 03:59:18 +08:00
refactor: Replace poll with pop in Queue and Deque (#415)
This commit is contained in:
@@ -27,8 +27,8 @@ pub fn main() {
|
||||
println!("\n队首元素 peek = {peek}");
|
||||
|
||||
// 元素出队
|
||||
let poll = queue.pop_front().unwrap();
|
||||
print!("出队元素 poll = {poll},出队后 queue = ");
|
||||
let pop = queue.pop_front().unwrap();
|
||||
print!("出队元素 pop = {pop},出队后 queue = ");
|
||||
print_util::print_queue(&queue);
|
||||
|
||||
// 获取队列的长度
|
||||
|
||||
Reference in New Issue
Block a user