容器(数据类型):修订间差异

求闻百科,共笔求闻
添加的内容 删除的内容
(机器人:清理不当的来源;移除无用的模板参数;替换{{reflist}}等模板参数;替换裸露的<references />)
(// Edit via Wikiplus)
 

(未显示另一用户的1个中间版本)

第6行: 第6行:
== 概览 ==
== 概览 ==
容器可以三种方式看待:
容器可以三种方式看待:
* ''访问'':即访问容器中对象的方式。在[[数组]]中,访问凭借数组索引完成。在[[堆栈]]中,访问遵循[[先進先出|先入后出]](或后入先出)的顺序<ref name = "investopedia LIFO">{{Cite web |url=http://www.investopedia.com/terms/l/lifo.asp#axzz1ZoGPLx59 |title=LIFO(investopedia.com) |accessdate=2016-08-19 |||}}</ref>。在[[队列]]中,访问遵循[[先進先出|先入先出]](或后入后出)的顺序<ref name = "Investopedia FIFO">{{Cite web |url=http://www.investopedia.com/terms/f/fifo.asp#axzz1ZoGPLx59 |title=FIFO(investopedia.com) |accessdate=2016-08-19 |||}}</ref><ref name = "businessdictionary">{{Cite web |url=http://www.businessdictionary.com/definition/first-in-first-out-FIFO.html |title=FIFO(businessdictionary.com) |accessdate=2016-08-19 |||}}</ref>。
* ''访问'':即访问容器中对象的方式。在[[数组]]中,访问凭借数组索引完成。在[[堆栈]]中,访问遵循[[先進先出|先入后出]](或后入先出)的顺序<ref name = "investopedia LIFO">{{Cite web |url=http://www.investopedia.com/terms/l/lifo.asp#axzz1ZoGPLx59 |title=LIFO(investopedia.com) |accessdate=2016-08-19 }}</ref>。在[[队列]]中,访问遵循[[先進先出|先入先出]](或后入后出)的顺序<ref name = "Investopedia FIFO">{{Cite web |url=http://www.investopedia.com/terms/f/fifo.asp#axzz1ZoGPLx59 |title=FIFO(investopedia.com) |accessdate=2016-08-19 }}</ref><ref name = "businessdictionary">{{Cite web |url=http://www.businessdictionary.com/definition/first-in-first-out-FIFO.html |title=FIFO(businessdictionary.com) |accessdate=2016-08-19 }}</ref>。
* ''存储'':即存储容器中对象的方式。
* ''存储'':即存储容器中对象的方式。
* ''遍历'':即遍历容器中对象的方式。
* ''遍历'':即遍历容器中对象的方式。
第42行: 第42行:
| accessdate = 2013-04-20
| accessdate = 2013-04-20
| url = http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/composites.htm#CIHIEBJC
| url = http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/composites.htm#CIHIEBJC
|
|
|
}}</ref>
}}</ref>
* [[Python]]: 内置容器 ''list''、''dict''、''tuple''和''set'',可使用[https://docs.python.org/3/library/collections.html collections]模块进一步拓展。
* [[Python]]: 内置容器 ''list''、''dict''、''tuple''和''set'',可使用[https://docs.python.org/3/library/collections.html collections]模块进一步拓展。
第64行: 第61行:
* [http://www.grantjenks.com/docs/sortedcontainers/ Python SortedContainers module] A fast implementation of sorted list, sorted dict, and sorted set data types in Python.
* [http://www.grantjenks.com/docs/sortedcontainers/ Python SortedContainers module] A fast implementation of sorted list, sorted dict, and sorted set data types in Python.
{{数据类型}}
{{数据类型}}

[[面向对象编程]]

{{DEFAULTSORT:容器 (数据结构)}}
[[Category:数据结构]]
[[Category:数据结构]]
[[Category:抽象数据类型]]
[[Category:抽象数据类型]]