Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zpnst/smart-list
Functional doubly linked list
https://github.com/zpnst/smart-list
cpp datastructures doubly-linked-list oop
Last synced: 1 day ago
JSON representation
Functional doubly linked list
- Host: GitHub
- URL: https://github.com/zpnst/smart-list
- Owner: zpnst
- Created: 2023-10-19T17:43:15.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-25T20:07:13.000Z (about 1 year ago)
- Last Synced: 2024-05-11T21:37:34.886Z (9 months ago)
- Topics: cpp, datastructures, doubly-linked-list, oop
- Language: C++
- Homepage:
- Size: 24.4 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://github.com/zpnst/SmartList/assets/105946529/3e893c35-e2b1-4bde-8895-b1d5f090d590)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](https://github.com/zpnst/SmartList/assets/105946529/f91f77db-a2c3-417a-87d8-62adf85c8a18)## 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](https://github.com/zpnst/SmartList/assets/105946529/18817dc5-2cfc-4197-8e4c-2b800bbb11f5)## 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](https://github.com/zpnst/SmartList/assets/105946529/846f6662-9e76-4fa9-86be-7c6d338ace78)## See you soon...