Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Set.h"
- void Set::initializeEmptySet()
- {
- m_size = 0;
- m_head = new Node;
- m_head->m_next = nullptr;
- m_head->m_prev = nullptr;
- }
- Set::Set()
- {
- initializeEmptySet();
- }
- Node* Set::findClosestLocation(const ItemType& value) const
- {
- // We will either find if the value exists in the set
- // Or we will find the closest value greater than the given value
- // Go through each node looking for a match
- Node* p = m_head;
- while (p->m_value < value)
- {
- p = p->m_next;
- }
- return p;
- }
- bool Set::insert(const ItemType& value)
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement