@@ -10,7 +10,7 @@ msgstr ""
10
10
"Project-Id-Version : Python 3.11\n "
11
11
"Report-Msgid-Bugs-To : \n "
12
12
"POT-Creation-Date : 2018-10-19 17:24+0800\n "
13
- "PO-Revision-Date : 2023-06-28 14:36 +0800\n "
13
+ "PO-Revision-Date : 2023-06-29 12:10 +0800\n "
14
14
"Last-Translator : Liang-Bo Wang <me@liang2.tw>\n "
15
15
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
16
16
"tw)\n "
@@ -245,6 +245,8 @@ msgid ""
245
245
"pushing all values onto a heap and then popping off the smallest values one "
246
246
"at a time::"
247
247
msgstr ""
248
+ "`堆積排序 (heapsort) <https://en.wikipedia.org/wiki/Heapsort>`_ 可以透過將所"
249
+ "有的值推入一個 heap,並且從 heap 中一個接一個彈出最小元素來實作:"
248
250
249
251
#: ../../library/heapq.rst:151
250
252
msgid ""
@@ -264,13 +266,15 @@ msgstr ""
264
266
265
267
#: ../../library/heapq.rst:167
266
268
msgid "Priority Queue Implementation Notes"
267
- msgstr "優先佇列 (Priority Queue) 實作細節 "
269
+ msgstr "優先佇列實作細節 "
268
270
269
271
#: ../../library/heapq.rst:169
270
272
msgid ""
271
273
"A `priority queue <https://en.wikipedia.org/wiki/Priority_queue>`_ is common "
272
274
"use for a heap, and it presents several implementation challenges:"
273
275
msgstr ""
276
+ "`優先佇列 (priority queue) <https://en.wikipedia.org/wiki/Priority_queue>`_ "
277
+ "是 heap 的常見用途之一,實作優先佇列伴隨著下列挑戰:"
274
278
275
279
#: ../../library/heapq.rst:172
276
280
msgid ""
@@ -322,6 +326,8 @@ msgid ""
322
326
"wrapper class that ignores the task item and only compares the priority "
323
327
"field::"
324
328
msgstr ""
329
+ "task 無法比較的另一個解決方案是建立一個包裝器類別,該類別忽略 task 項目,只比"
330
+ "較優先等級:"
325
331
326
332
#: ../../library/heapq.rst:201
327
333
msgid ""
@@ -362,6 +368,8 @@ msgid ""
362
368
"The strange invariant above is meant to be an efficient memory "
363
369
"representation for a tournament. The numbers below are *k*, not ``a[k]``::"
364
370
msgstr ""
371
+ "上述乍看之下有些奇怪的不變式,是為了實作一個對記憶體來說有效率的方法,其表示"
372
+ "方式如同錦標賽一般。下列的數字為 *k*,而不是 ``a[k]``:"
365
373
366
374
#: ../../library/heapq.rst:259
367
375
msgid ""
@@ -375,6 +383,12 @@ msgid ""
375
383
"two cells it tops contain three different items, but the top cell \" wins\" "
376
384
"over the two topped cells."
377
385
msgstr ""
386
+ "在上面的樹當中,每個單元 *k* 都會位在 ``2*k+1`` 與 ``2*k+2`` 上方。如同體育賽"
387
+ "事常見的錦標賽般,每個單元可視為其下方兩個單元當中的贏家,我們可以透過追溯整"
388
+ "棵樹來找到該贏家曾經對戰過的所有對手。然而,在許多電腦應用中,我們不需要追溯"
389
+ "贏家的完整對戰歷史。為了能更有效率地使用記憶體,當一個贏家晉級勝出時,我們用"
390
+ "下方較低層級的另一個項目來取代它,至此規則變為一個單元以及它下方兩個單元,包"
391
+ "含三個不同項目,但是最上方的單元「勝過」下方兩個單元。"
378
392
379
393
#: ../../library/heapq.rst:268
380
394
msgid ""
0 commit comments