#ifndef _MedianHeap #define _MedianHeap #include using namespace std; template class MedianHeap { public: MedianHeap( ) { } const Object & findKth( int k ) const; bool isEmpty( ) const; int getSize( ) const { return items.size( ); } void makeEmpty( ); void removeKth( int k ); void removeKth( int k, Object & x ); void insert( const Object & x ); private: vector items; // the array }; #endif template void MedianHeap::makeEmpty( ) { items.resize( 0 ); }