对于n个元素的关键宇序列{k1,k2,...kn},当且仅当满足关系ki≤k2i且ki≤k2i+1{i=1.2...[n/2]}时称其为小根堆(小顶堆)。以下序列中,(60)不是小根堆。
A.16,25,40,55,30,50,45 B.16,40,25,50,45,30,55 C.16,25,39.,41,45,43,50 D.16,40,25,53,39,55,45正确答案D
对于n个元素的关键宇序列{k1,k2,...kn},当且仅当满足关系ki≤k2i且ki≤k2i+1{i=1.2...[n/2]}时称其为小根堆(小顶堆)。以下序列中,(60)不是小根堆。
A.16,25,40,55,30,50,45 B.16,40,25,50,45,30,55 C.16,25,39.,41,45,43,50 D.16,40,25,53,39,55,45正确答案D