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

程序填空题:python正则表达式-规律

Luz5年前 (2021-05-10)748
找出下列数据的规律,然后进行匹配。。需要匹配的* abc01* ddd02* afcf01* acac11* 321* acef33* bbc000不能匹配的* ABCDEFG789654* CODEJIAONANG* ghjkloiqwt…

程序填空题:一年的第几天

Luz5年前 (2021-05-10)589
输入某年某月某日,判断这一天是这一年的第几天?```c++#include int main(){ int year,month,day; int sum; int leap; int T; scanf("%d……

程序填空题:最小生成树(普里姆算法)

Luz5年前 (2021-05-10)1235
最小生成树(普里姆算法)。```c++#include #define MVNum 100#define MaxInt 32767 using namespace std;struct edge{ char adjvex; int lowc…

程序填空题:The Turnpike Reconstruction Problem

Luz5年前 (2021-05-10)596
Suppose we are given $n$ points $p_1, p_2, ... p_n$ located on the $x$-axis. $x_i$ is the $x$-coordinate of $p_i$. Let……

程序填空题:Sum of N-Narcissistic Number

Luz5年前 (2021-05-10)482
An $n$-digit number that is the sum of the $n$-th powers of its digits is called an $n$-narcissistic number. For example…

程序填空题:B+ Tree - Find Key

Luz5年前 (2021-05-10)718
The function `FindKey` is to check if a given `key` is in a B+ Tree with its root pointed by `root`. Return `true` if `k…

程序填空题:Width of a Binary Tree

Luz5年前 (2021-05-10)773
The function is to find the width of a binary tree `T`. The width of a binary tree is the maximum number of nodes on on……

程序填空题:Topological Sort

Luz5年前 (2021-05-10)940
The function is to do topological sort on a graph `G`. `TopNum[]` starts counting from 1.```c++void Topsort( Graph G ){……

程序填空题:Percolate Down

Luz5年前 (2021-05-10)1109
Please fill in the blanks in the program which percolates down from position `p` in a max-heap `H`.```c++void PercolateD…

程序填空题:Bubble Sort

Luz5年前 (2021-05-10)2268
Bubble sort is a simple sorting algorithm. Suppose we have a list of integers and want to sort them in ascending order.……

程序填空题:DecreaseKey

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

程序填空题:Hash Insertion

Luz5年前 (2021-05-10)1269
The function is to insert an item into the hash table `ht[]` with the hash function `hash`. Here a `list` node contains……

程序填空题:Find

Luz5年前 (2021-05-10)1859
Please fill in the blanks in the program which performs `Find` as a Union/Find operation with path compression.```c++Set…

程序填空题:Heap Sort

Luz5年前 (2021-05-10)1711
The function is to sort `N` elements in non-decreasing order by heap sort.```c++#define leftchild(i) ( 2*(i)+1 )void Per…

程序填空题:Level Order Traversal

Luz5年前 (2021-05-10)1416
The function is to list out the nodes of a binary tree `T` in "level-order".```c++typedef struct TreeNode *Tree;struct T…

程序填空题:MinHeap Deletion

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

程序填空题:Modified Selection Sort

Luz5年前 (2021-05-10)750
The function is to sort the list { `r[1] … r[n]` } in non-decreasing order. Unlike selection sort which places only the……

程序填空题:小顶堆键值下调

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

程序填空题:集合查找

Luz5年前 (2021-05-10)1347
请填空完成下列代码,功能是实现并查集中的“查”,并且带路径压缩。```c++SetType Find ( ElementType X, DisjSet S ){ ElementType root, trail, lead; f……

程序填空题:散列插入

Luz5年前 (2021-05-10)3922
下列代码的功能是利用散列函数`hash`将一个元素插入到散列表`ht[]`中。其中`list`类型的结点包含`element`类型的项`item`、以及一个`next`指针。如果插入成功,则函数返回1,否则返回0。```c++int ins…