堆是一个键值序列{k1,k2,……kn),对i=1,2…,|n/2|,满足(48)。A.ki<k2i+1<k2iB.ki≤k2i≤k2i+1C.ki≤k2i 且ki≤k2i+1(2i+1≤n)D.ki≤k2i或ki≤k2i+1(2i+1≤n)
堆是一个键值序列{k1,k2,……kn),对i=1,2…,|n/2|,满足(48)。
A.ki<k2i+1<k2i
B.ki≤k2i≤k2i+1
C.ki≤k2i 且ki≤k2i+1(2i+1≤n)
D.ki≤k2i或ki≤k2i+1(2i+1≤n)
相关考题:
对于n个元素的关键字序列{k1,k2,…,kn},当且仅当满足关系ki≤k2i,且ki≤k2i+1(2i≤ n,2i+1≤n)称其为小根堆,反之则为大根堆。以下序列中,(56)不符合堆的定义。A.(4,10,15,72,39,23,18)B.(58,27,36,12,8,23,9)C.(4,10,18,72,39,23,15)D.(58,36,27,12,8,23,9)
对于n个元素的关键字序列{k1,k2,…,kn},当且仅当满足关系ki≤K2i且ki≤K2i(2i≤n,2i+1≤n)称其为小根堆,反之则为大根堆。以下序列中,(38)不符合堆的定义。A.(5,10,15,76,39,27,18)B.(5,10,18,76,39,27,15)C.(59,27,36,15,8,25,9)D.(59,36,27,15,8,25,9)
对于n个元素的关键字序列K1,K2,…,Kn,若有Ki≤K2i≤且Ki≤2i+1(i=1,2,…,[n/2],2i+1≤n),则称其为小根堆。以下关于小根堆及其元素关系的叙述中,错误的是( )。A.关键字序列K1,K2,…,Kn呈非递减排序时一定为小根堆B.小根堆中的序列K1,K2,K4…,K2j(2j≤n)一定为非递减序列C.小根堆中元素K2i与K2i+1(2i≤n,2i+1≤n)之间的大小关系不能确定D.小根堆的最后一个元素一定是序列的最大元素
对于n个元素的关键字序列{k1,k2,…,kn),当且仅当满足关系Ki≤K2i且Ki≤K2i+1(2i≤n,2i+1≤n)称其为小根堆,反之则为大根堆。以下序列中,(58)不符合堆的定义。A.(5,10,15,76,39,27,18)B.(5,10,18,76,39,27,15)C.(59,27,36,15,8,25,9)D.(59,36,27,15,8,25,9)
对于n个元素的关键宇序列{k1,k2, ...kn},当且仅当满足关系kik2i且kik2i+1{i=1.2...[n/2]} 时称其为小根堆(小顶堆)。以下序列中,( )不是小根堆。A.16,25,40,55,30,50,45B.16,40,25,50,45,30,55C.16,25,39.,41,45,43,50D.16,40,25,53,39,55,45
对于n个元素的关键字序列{ki, k2,…,kn},当且仅当满足关系ki≤k2i且ki≤k2i+i(i=1, 2,…[n/2])时称为小根堆(小顶堆)。以下序列中,( )不是小根堆。A.12, 20, 36, 48, 25, 50, 40B.12, 36, 20, 48, 40, 25, 50C.12, 20, 25, 36, 40, 48, 50D.12, 36, 20, 48, 25, 50, 40
对于n个元素的关键字序列{K1,K2,…,Kn},当目仅当满足Ki="则称其为大顶堆。由此可知,( )是大顶堆。A.7,2,3,4,5,6,1B.7,5,4,2,6,3,1C.7,6,4,2,5,3,1D.7,5,3,1,6,4,2
对于n个元素的关键字序列{K1,K2,…,Kn},当目仅当满足Ki="则称其为大顶堆。由此可知,以下选项中,( )是大顶堆。A.2,1,4,5,3B.5,3,2,4,1C.5,3,4,1,2D.4,2,5,1,3
对于n个元素的关键宇序列{k1,k2,...kn},当且仅当满足关系ki≤k2i且ki≤k2i+1{i=1.2...[n/2]}时称其为小根堆(小顶堆)。以下序列中,(60)不是小根堆。A.16,25,40,55,30,50,45B.16,40,25,50,45,30,55C.16,25,39.,41,45,43,50D.16,40,25,53,39,55,45