搜索资源列表
红黑树是一个更高效的检索二叉树
- 红黑树是一个更高效的检索二叉树,因此常常用来实现关联数组。典型地,JDK提供的集合类TreeMap本身就是一个红黑树的实现。-Red-black tree is a binary tree search more efficient, so often used to implement associative arrays. Typically, JDK provides a collection of classes TreeMap itself is a red-black tree im
sjjg4-6
- 数据结构ppt教程,第4章讲述的是串,第5章讲述的是数组,第6章讲述的是树和二叉树-Data structure tutorial ppt, Chapter 4 is on the string, described in Chapter 5 is an array, Chapter 6 is about trees and tree
homework
- 设二叉树的结点的数据场之值仅为一大写英文字母。其前序和中序的遍历结果(打印结点的数据场之值)分别保存在字符串数组 preorder[N] 及 inorder[N]之中,其中 N 为常数。请设计程序以标准形式存储保存该二叉树。-Based binary tree node data field of the value is only a capital letter. The pre-order traversal order and the results (the data field t
BSTSort
- //本程序实现二叉排序树的基本操作: //1:输入数组长度和一串数,创建它的二叉排序树; //2:查找给定元素,并给出层次值; //3:插入给定元素; //4:先根和中根遍历; //5:显示菜单 //0:退出程序。-//This program is to achieve the basic operation of the binary sort tree:// 1: the length of the input array and a string of numbe
sort
- 简单的c++排序算法一:高级排序算法它的工作看起来仍然象一个二叉树。首先我们选择一个中间值middle程序中我们使用数组中间值,然后把比它小的放在左边,大的放在右边(具体的实现是从两边找,找到一对后交换)。然后对两边分别使用这个过程(最容易的方法——递归)。-Simple c++ sorting algorithm: Advanced sorting algorithm it still looks like a binary tree. First, we chose an intermedi
binarytree
- 二叉树的顺序存储结构——已知用户将一棵完全二叉树的n个结点(数据类 型可以是字符型、整型等等)以自顶向下、从左到右顺序输 入到一个一维数组中: (1)编写算法FindRelation(i),输出i的父结点和 所有孩子结点(如果有的话)。(2)编写算法Print打印这棵二叉树的所有节点:先打印二叉树的 根、再打印左子树、最后打印右子树;(即在顺序存储结构上先序遍历 二叉树); -Stored in the order of the binary tree
Binary-tree-structure
- 从文件中接受一组数,动态创建一个二叉树,并且先序中序和后序遍历-Accept a set of numbers, from a file dynamically create a binary tree, and the first sequence in the sequence and after preorder
SelectionSort
- 选择排序: 分为直接选择排序, 堆排序 直接选择排序:第i次选取 i到array.Length-1中间最小的值放在i位置。 堆排序:首先,数组里面用层次遍历的顺序放一棵完全二叉树。从最后一个非终端结点往前面调整,直到到达根结点,这个时候除根节点以外的所有非终端节点都已经满足堆得条件了,于是需要调整根节点使得整个树满足堆得条件,于是从根节点开始,沿着它的儿子们往下面走(最大堆沿着最大的儿子走,最小堆沿着最小的儿子走)。 主程序里面,首先从最后一个非终端节点开始调整到根
rebuild
- 二叉树的遍历。输入两组数据,分别为二叉树的先序和中序遍历。若能构成一个二叉树,则输出后序遍历,否则输出-1.注意程序并没有建树,只是用数组下标模拟。-Binary tree traversal. Enter the two sets of data, respectively, the first binary sequence and preorder. If we can form a binary tree, the rear output preorder, otherwise the
Arraytree-list
- 已知一棵二叉树的数组存储方式(即一个数组中以完全二叉树的对应方式放置了一棵二叉树) ,据此建立该二叉树的二叉链表,以某种遍历方式(前、中、后)进行结点的输出以检查建立结果。 -array to build tree
Search
- 查找,使用结构体数组,采用顺序查找,链式查找,建立二叉排序树-Finding, using an array of structures using sequential search, chain search, the establishment of a binary sort tree
After_BinaryTree
- 输入一个整数数组,判断该数组是不是某二叉搜索树的后序遍历。 -Two binary search tree traversal sequence
sort
- 基数排序 基数排序(radix sort)属于“分配式排序”(distribution sort),又称“桶子法”(bucket sort)或bin sort,顾名思义,它是透过键值的部份资讯,将要排序的元素分配至某些“桶”中,藉以达到排序的作用,基数排序法是属于稳定性的排序,其时间复杂度为O (nlog(r)m),其中r为所采取的基数,而m为堆数,在某些时候,基数排序法的效率高于其它的稳定性排序法。 快速排序 快速排序由C. A. R. Hoare在1962年提出。它的基本思想是
c++算法与实践
- C++算法与实践 算法原理与实践课件1_谈&面试中的算法和编程准备 算法原理与实践课件5_二叉树 算法原理与实践课件2_数组与字符串 算法原理与实践课件3_链表 算法原理与实践课件6_排序和二分搜索(C++ Algorithm and Practice)