Skip to content

Instantly share code, notes, and snippets.

@rajkumar-p
Last active March 11, 2020 19:04
Show Gist options
  • Save rajkumar-p/d0c3d7b4d2d72feaa528231316f0157f to your computer and use it in GitHub Desktop.
Save rajkumar-p/d0c3d7b4d2d72feaa528231316f0157f to your computer and use it in GitHub Desktop.

Revisions

  1. rajkumar-p revised this gist Mar 11, 2020. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions sorted_list.hpp
    Original file line number Diff line number Diff line change
    @@ -11,6 +11,4 @@ class SortedList : public Set<T>
    bool add(T elem);
    bool remove(T elem);
    bool exists(T elem);

    void print_elements();
    };
  2. rajkumar-p revised this gist Mar 11, 2020. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion sorted_list.hpp
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,6 @@ class SortedList : public Set<T>
    bool add(T elem);
    bool remove(T elem);
    bool exists(T elem);
    unsigned int size();

    void print_elements();
    };
  3. rajkumar-p created this gist Mar 11, 2020.
    17 changes: 17 additions & 0 deletions sorted_list.hpp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    template<typename T>
    class SortedList : public Set<T>
    {
    private:
    NodeListWithLock<T> *_head;

    public:
    SortedList();
    ~SortedList();

    bool add(T elem);
    bool remove(T elem);
    bool exists(T elem);
    unsigned int size();

    void print_elements();
    };