Merge branch 'master' of github.com:krahets/hello-algo

This commit is contained in:
Yudong Jin
2023-01-14 19:52:27 +08:00
5 changed files with 73 additions and 1 deletions

View File

@@ -246,6 +246,7 @@ comments: true
let peek = queue.first!
/* 元素出队 */
// 使用 Array 模拟时 poll 的复杂度为 O(n)
let pool = queue.removeFirst()
/* 获取队列的长度 */