-->
当前位置:首页 > 搜索 "程序填空题"

程序填空题:小顶堆的指定删除

Luz5年前 (2021-05-10)820
下列代码的功能是从小顶堆`H`中删除指定位置`p`上的元素,然后继续调整为小顶堆。```c++Deletion ( PriorityQueue H, int p ) /* delete the element H-˃Elements[p……

程序填空题:层序遍历

Luz5年前 (2021-05-10)2504
下列代码的功能是将二叉树`T`中的结点按照层序遍历的顺序输出。```c++typedef struct TreeNode *Tree;struct TreeNode{ int Key; Tree Left; Tree Rig……

程序填空题:另类选择排序

Luz5年前 (2021-05-10)3067
下列代码的功能是将一列元素{ `r[1] … r[n]` }按其键值 `key` 的非递减顺序排序。普通选择排序是每次仅将一个待排序列的最小元放到正确的位置上,而这个另类的选择排序是每次从待排序列中同时找到最小元和最大元,把它们放到最终的正…

程序填空题:大顶堆的下滤

Luz5年前 (2021-05-10)1796
下列代码的功能是从一个大顶堆`H`的某个指定位置`p`开始执行下滤。```c++void PercolateDown( int p, PriorityQueue H ){ int child; ElementType Tmp =……

程序填空题:Shellsort Runs

Luz5年前 (2021-05-10)1573
Show the result of running Shellsort on the input 9, 8, 7, 6, 5, 4, 3, 2, 1 using the increments {1, 3, 7}. Please fill……

程序填空题:二叉树的宽度

Luz5年前 (2021-05-10)2515
下列代码的功能是计算给定二叉树`T`的宽度。二叉树的宽度是指各层结点数的最大值。函数`Queue_rear`和`Queue_front`分别返回当前队列`Q`中队尾和队首元素的位置。```c++typedef struct TreeNode…

程序填空题:拓扑排序

Luz5年前 (2021-05-10)4600
下列代码的功能是对一个给定的图`G`执行拓扑排序,其中`TopNum[]`从1开始记录拓扑序。```c++void Topsort( Graph G ){ Queue Q; Vertex V, W; NodePtr ptr;……

程序填空题:希尔排序的分步结果

Luz5年前 (2021-05-10)6084
本题要求给出希尔排序对给定初始序列{9, 8, 7, 6, 5, 4, 3, 2, 1}利用增量序列{1, 3, 7}进行排序的分步结果。将每步结果填在下列空中。注意:相邻数字间必须有一个空格,开头结尾不得有多余空格。|原始序列| 9 8……

程序填空题:Reverse Linked List

Luz5年前 (2021-05-10)1854
The function is to return the reverse linked list of `L`, with a dummy header.```c++List Reverse( List L ){ Position……

程序填空题:输出字符串1

Luz5年前 (2021-05-10)1390
打印“Hello World!”,占一行。```c++#include using namespace std;int main(){ cout˂˂"@@[Hello World!](10)"˂˂endl; return 0;}……

程序填空题:单链表逆转

Luz5年前 (2021-05-10)2899
下列代码的功能是返回带头结点的单链表`L`的逆转链表。```c++List Reverse( List L ){ Position Old_head, New_head, Temp; New_head = NULL; Ol……

程序填空题:IncreaseKey

Luz5年前 (2021-05-10)814
The function is to increase the value of the integer key at position `P` by a positive amount `D` in a max-heap `H`.```c…

程序填空题:MaxHeap Deletion

Luz5年前 (2021-05-10)742
Please fill in the blanks in the program which deletes a given element at position `p` from a max-heap `H`.```c++Deletio…

程序填空题:大顶堆键值上调

Luz5年前 (2021-05-10)2129
下列代码的功能是将大顶堆`H`中指定位置`P`上的元素的整数键值上调`D`个单位,然后继续将`H`调整为大顶堆。```c++void IncreaseKey( int P, int D, PriorityQueue H ){ int i……

程序填空题:大顶堆的指定删除

Luz5年前 (2021-05-10)1638
下列代码的功能是从大顶堆`H`中删除指定位置`p`上的元素,然后继续调整为大顶堆。```c++Deletion ( PriorityQueue H, int p ) /* delete the element H-˃Elements[p……

程序填空题:并查运算

Luz5年前 (2021-05-10)1092
本题要求给出下列并查集操作执行后,集合数组内存储的结果。```union( find(2), find(7) )union( find(3), find(5) )union( find(0), find(2) )union( find(5)…

程序填空题:Union / Find

Luz5年前 (2021-05-10)702
Please fill the array with the results after the following union/find operations.```union( find(2), find(7) )union( find…

程序填空题:Union - Find

Luz5年前 (2021-05-10)627
Please fill the array with the results after the following union/find operations.```union( find(4), find(6) )union( find…

程序填空题:并--查运算

Luz5年前 (2021-05-10)729
本题要求给出下列并查集操作执行后,集合数组内存储的结果。```union( find(1), find(5) )union( find(3), find(6) )union( find(0), find(1) )union( find(6)…

程序填空题:Union--Find

Luz5年前 (2021-05-10)723
Please fill the array with the results after the following union/find operations.```union( find(1), find(5) )union( find…