PriorityQueue1 Priority Queues Priority Queue 우선순위를 가진 요소에 언제든 접근할 수 있는 구조 PQType(int max) items : 구조체 HeapType 이름. elements : HeapType 멤버 중 데이터 저장하는 배열. template PQType::PQType(int max){ length = 0; items.elements = new ItemType[max]; maxItems = max; } ~PQType() 배열을 삭제해줘야한다! template PQType::~PQType(){ delete []items.elements; } void MakeEmpty() template void PQType::MakeEmpty(){ length = 0; } bool IsEmpty() template bool PQ.. 2023. 6. 9. 이전 1 다음