mirror of
https://github.com/krahets/hello-algo.git
synced 2026-02-11 22:55:39 +08:00
refactor: Replace poll with pop in Queue and Deque (#415)
This commit is contained in:
@@ -30,8 +30,8 @@ pub fn main() !void {
|
||||
std.debug.print("\n队首元素 peek = {}", .{peek});
|
||||
|
||||
// 元素出队
|
||||
var poll = queue.popFirst().?.data;
|
||||
std.debug.print("\n出队元素 poll = {},出队后 queue = ", .{poll});
|
||||
var pop = queue.popFirst().?.data;
|
||||
std.debug.print("\n出队元素 pop = {},出队后 queue = ", .{pop});
|
||||
inc.PrintUtil.printQueue(i32, queue);
|
||||
|
||||
// 获取队列的长度
|
||||
|
||||
Reference in New Issue
Block a user