src/TreeTimer.cpp
// This operation is O(n) complexity
This operation is O(n) complexity
This operation is O ( n ) complexity
bool TreeTimer::Cancel(int id)
{
   auto it = ref_.find(id);
   if (it != ref_.end()) {
       tree_.erase(it->second);
       ref_.erase(it);
       return true;
   }
   return false;
}
bool TreeTimer :: Cancel ( int id ) { auto it = ref_ . find ( id ) ; if ( it != ref_ . end ( ) ) { tree_ . erase ( it -> second ) ; ref_ . erase ( it ) ; return true ; } return false ; }
This operation is O(n) complexity
This operation is O ( n ) complexity