zpnst / smart-list

Functional doubly linked list

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Smart List

Structure

The list is developed on the basis of a template class, which is based on a doubly linked list

std::shared_ptr & std::weak_ptr

image

Using std::weak_ptr as a pointer to the previous element of a node, together with std::shared_ptr helped to avoid cyclic references

Different types of constructors are implemented

image

Functions for working with a list

  1. Function for adding an item to any place in the list
  2. Function for deleting an item anywhere in the list
  3. Function for creating a set from a list
  4. Function for sorting the list based on bubble sort
  5. Operator [] overload
  6. Function for formatted list output

And functions for convenience:

image

Operators overloading

Overload has been implemented for *, +, / operators
They are responsible for operations between a List and a Variable and a List and a List

image

See you soon...

About

Functional doubly linked list


Languages

Language:C++ 100.0%