優(yōu)先隊(duì)列的top和pop函數(shù)到底是什么?
優(yōu)先隊(duì)列實(shí)際上是個(gè)堆,如果把它當(dāng)做隊(duì)列來看的話,top就是取隊(duì)首元素,pop就是隊(duì)首元素出隊(duì)咯,隊(duì)列是按照優(yōu)先級來排的,沒記錯(cuò)的話應(yīng)該是operator
優(yōu)先隊(duì)列的top和pop函數(shù)到底是什么?
優(yōu)先隊(duì)列實(shí)際上是個(gè)堆,如果把它當(dāng)做隊(duì)列來看的話,top就是取隊(duì)首元素,pop就是隊(duì)首元素出隊(duì)咯,隊(duì)列是按照優(yōu)先級來排的,沒記錯(cuò)的話應(yīng)該是operator