当前位置:首页 > 搜索 "程序填空题"
程序填空题:python正则表达式-规律
找出下列数据的规律,然后进行匹配。。需要匹配的*abc01*ddd02*afcf01*acac11*321*acef33*bbc000不能匹配的*ABCDEFG789654*CODEJIAONANG*ghjkloiqwt......
程序填空题:一年的第几天
输入某年某月某日,判断这一天是这一年的第几天?```c++#includeintmain(){intyear,month,day;intsum;intleap;intT;scanf("%d......
程序填空题:最小生成树(普里姆算法)
最小生成树(普里姆算法)。```c++#include#defineMVNum100#defineMaxInt32767usingnamespacestd;structedge{charadjvex;intlowc......
程序填空题:The Turnpike Reconstruction Problem
Supposewearegiven$n$points$p_1,p_2,...p_n$locatedonthe$x$-axis.$x_i$isthe$x$-coordinateof$p_i$.Let......
程序填空题:Sum of N-Narcissistic Number
An$n$-digitnumberthatisthesumofthe$n$-thpowersofitsdigitsiscalledan$n$-narcissisticnumber.Forexample......
程序填空题:B+ Tree - Find Key
Thefunction`FindKey`istocheckifagiven`key`isinaB+Treewithitsrootpointedby`root`.Return`true`if`k......
程序填空题:Width of a Binary Tree
Thefunctionistofindthewidthofabinarytree`T`.Thewidthofabinarytreeisthemaximumnumberofnodesonon......
程序填空题:Topological Sort
Thefunctionistodotopologicalsortonagraph`G`.`TopNum[]`startscountingfrom1.```c++voidTopsort(GraphG){......
程序填空题:Percolate Down
Pleasefillintheblanksintheprogramwhichpercolatesdownfromposition`p`inamax-heap`H`.```c++voidPercolateD......
程序填空题:Bubble Sort
Bubblesortisasimplesortingalgorithm.Supposewehavealistofintegersandwanttosorttheminascendingorder.......
程序填空题:DecreaseKey
Thefunctionistolowerthevalueoftheintegerkeyatposition`P`byapositiveamount`D`inamin-heap`H`.```c++v......
程序填空题:Hash Insertion
Thefunctionistoinsertanitemintothehashtable`ht[]`withthehashfunction`hash`.Herea`list`nodecontains......
程序填空题:Find
Pleasefillintheblanksintheprogramwhichperforms`Find`asaUnion/Findoperationwithpathcompression.```c++Set......
程序填空题:Heap Sort
Thefunctionistosort`N`elementsinnon-decreasingorderbyheapsort.```c++#defineleftchild(i)(2*(i)+1)voidPer......
程序填空题:Level Order Traversal
Thefunctionistolistoutthenodesofabinarytree`T`in"level-order".```c++typedefstructTreeNode*Tree;structT......
程序填空题:MinHeap Deletion
Pleasefillintheblanksintheprogramwhichdeletesagivenelementatposition`p`fromamin-heap`H`.```c++Deletio......
程序填空题:Modified Selection Sort
Thefunctionistosortthelist{`r[1]…r[n]`}innon-decreasingorder.Unlikeselectionsortwhichplacesonlythe......
程序填空题:小顶堆键值下调
下列代码的功能是将小顶堆`H`中指定位置`P`上的元素的整数键值下调`D`个单位,然后继续将`H`调整为小顶堆。```c++voidDecreaseKey(intP,intD,PriorityQueueH){inti......
程序填空题:集合查找
请填空完成下列代码,功能是实现并查集中的“查”,并且带路径压缩。```c++SetTypeFind(ElementTypeX,DisjSetS){ElementTyperoot,trail,lead;f......
程序填空题:散列插入
下列代码的功能是利用散列函数`hash`将一个元素插入到散列表`ht[]`中。其中`list`类型的结点包含`element`类型的项`item`、以及一个`next`指针。如果插入成功,则函数返回1,否则返回0。```c++intins....