假定对元素序列(7, 3, 5, 9, 1, 12)进行堆排序,并且采用小根堆,则由初始数据构成的初始堆为()。
A.1, 3, 5, 7, 9, 12
B.1, 3, 5, 9, 7, 12
C.1, 5, 3, 7, 9, 12
D.1, 5, 3, 9, 12, 7
假定一个初始堆为(1, 5, 3, 9, 12, 7, 15, 10),则进行第一趟堆排序后得到的结果为()。
A.3, 5, 7, 9, 12, 10, 15, 1
B.3, 5, 9, 7, 12, 10, 15, 1
C.3, 7, 5, 9, 12, 10, 15, 1
D.3, 5, 7, 12, 9, 10, 15, 1