搜索资源列表
vectoralist
- 练习vector和list的使用 定义一个空的vector,元素类型int,生成10个随机数插入到vector中,用迭代器遍历vector并输出其中的元素值。在vector头部插入一个随机数,用迭代器遍历vector并输出其中的元素值。用泛型算法find查找某个随机数,如果找到便输出,否则将此数插入vector尾部。用泛型算法sort将vector排序,用迭代器遍历vector并输出其中的元素值。将vector清空。 定义一个list,并重复上述实验,并注意观察结果。 -Exerc
tree
- c++下一个简单的多叉树实现: 利用迭代器方便地构建树, 可以递归输出,前序,后序。 利用栈实现输出。 销毁树只能后序遍历-c++ under a simple multi-tree implementation: the use of easy to build a tree iterator can be recursive output, pre-order after order. Use the stack to achieve the output. Only aft
Generic-function
- 泛型函数: 总结:使用标准模板库 (STL) C++标准库提供了更为安全,更为灵活的数据集处理方式。 STL的最主要的两个特点:数据结构和算法的分离,非面向对象本质。 访问对象是通过象指针一样的迭代器实现的;容器是象链表,矢量之类的数据结构,并按模板方式提供; 算法是函数模板,用于操作容器中的数据。由于STL以模板为基础,所以能用于任何数据类型和结构。-Generic function: Summary: Using the Standard Template Library
dictlist
- 索引链表实现细节,既有list的特点,又有map的特点。内部有两种迭代器实现。 list迭代iterator map迭代器kiterator 两种迭代器*,->操作都指向list节点。-Dictionary list(dictlist) realize detail, two kinds of iterator inside. one for list,the other for map. Both iterator point to the list node.
code
- 用C语言实现,基于迭代器的一元多项式计算,使得算法与具体的容器无关-Using the C language, regardless of the algorithm with specific container iterator-based polynomial, so
mergelist
- 利用list iterator合并两数列-Use merge two columns list iterator
PreOrderTree
- 数据结构树的初步实现 写了迭代器 还有树的先序遍历 但是iterator 的operator 没有实现-Preliminary data tree also wrote a tree traversal iterator iterator s operations but did not realize operator
数据结构
- 数据结构的主要任务就是通过描述对象的结构特征,包括逻辑结构在内的联系,然后把逻辑结构表示成计算机可实现的物理结构,从而方便计算机处理(Linked_List:The formal definition is "a data structure consisting of a group of nodes which together represent a sequence." Like arrays,linked lists have indexes,but are acc
