/***************************************** * Instructions * - Replace 'uwuserid' with your uWaterloo User ID * - Select the current calendar term and enter the year * - List students with whom you had discussions and who helped you * * uWaterloo User ID: uwuserid @uwaterloo.ca * Submitted for ECE 250 * Department of Electrical and Computer Engineering * University of Waterloo * Calender Term of Submission: (Winter|Spring|Fall) 201N * * By submitting this file, I affirm that * I am the author of all modifications to * the provided code. * * The following is a list of uWaterloo User IDs of those students * I had discussions with in preparing this project: * - * * The following is a list of uWaterloo User IDs of those students * who helped me with this project (describe their help; e.g., debugging): * - *****************************************/ #ifndef LAZY_DELETION_TREE_H #define LAZY_DELETION_TREE_H #ifndef nullptr #define nullptr 0 #endif #include #include "Lazy_deletion_node.h" template class Lazy_deletion_tree { private: Lazy_deletion_node *root_node; int count; public: Lazy_deletion_tree(); ~Lazy_deletion_tree(); bool empty() const; int size() const; int height() const; Type front() const; Type back() const; bool member( Type const & ) const; void breadth_first_traversal() const; bool insert( Type const & ); bool erase( Type const & ); void clean(); void clear(); }; template Lazy_deletion_tree::Lazy_deletion_tree(): root_node( nullptr ), count( 0 ) { // Only initializes member variables } template void Lazy_deletion_tree::breadth_first_traversal() const { if ( root_node == nullptr ) { return; } // Read up on the STL queue at http://www.cplusplus.com/reference/queue/queue/ std::queue< Lazy_deletion_node *> queue; queue.push( root_node ); while ( !queue.empty() ) { // do something... } } // Your implementation here #endif