【文件属性】:
文件名称:data-structures:数据结构实现
文件大小:12KB
文件格式:ZIP
更新时间:2021-05-19 01:17:47
Ruby
===我的研究+各种数据结构的实现。
首先,我将使用Ruby编写多个DS。 编辑为了方便测试,我包含了RSpec文件。
内容
(没有订单)
数据结构
大批
静态数组
动态阵列
链表
单链表
双链表
哈希图
树木
BST
ADT
哈希集
最大堆栈
MinMax堆栈建立在阵列上
MinMax StackQueue 使用MinMax堆栈构建的MinMax队列
笔记
HashMap VS HashSet
HashMap是Map的实现,其中键被映射到值。
HashSet是Set的实现,其中每个元素都是唯一值。
测验
要运行RSpecs :
叉子/这个仓库
在项目目录中运行bundle install
在目录中(在lib和spec ),运行rspec spec/{file_name}_spec.rb
享受绿色。
理想情况下,我最终希望加倍处理,或者用C语言编
【文件预览】:
data-structures-master
----Gemfile(81B)
----Gemfile.lock(601B)
----.rspec(31B)
----spec()
--------07_min_max_queue_spec.rb(0B)
--------02_static_array_spec.rb(1KB)
--------06_min_max_stack_spec.rb(2KB)
--------00_int_hash_set_spec.rb(1KB)
--------05_max_stack_spec.rb(2KB)
--------03_dynamic_array_spec.rb(2KB)
--------spec_helper.rb(107B)
--------04b_doubly_linked_list_spec.rb(0B)
----lib()
--------10_lru_cache.rb(962B)
--------01_hash_set.rb(1KB)
--------00_int_hash_set.rb(1KB)
--------04b_doubly_linked_list.rb(983B)
--------05_max_stack.rb(380B)
--------09_min_heap.rb(2KB)
--------04a_node.rb(1KB)
--------07_min_max_queue.rb(629B)
--------08_binary_search_tree.rb(29B)
--------02_static_array.rb(436B)
--------03_dynamic_array.rb(1KB)
--------06_min_max_stack.rb(604B)
----README.md(1KB)