{"id":19721020,"url":"https://github.com/paramsiddharth/linked-list-cpp","last_synced_at":"2025-07-05T00:41:08.814Z","repository":{"id":109334884,"uuid":"309324378","full_name":"paramsiddharth/linked-list-cpp","owner":"paramsiddharth","description":"A fully-functional implementation of a linked list in C++.","archived":false,"fork":false,"pushed_at":"2020-11-09T08:06:25.000Z","size":817,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-22T20:22:04.580Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paramsiddharth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-11-02T09:44:57.000Z","updated_at":"2020-11-09T08:06:27.000Z","dependencies_parsed_at":"2023-03-09T21:00:16.842Z","dependency_job_id":null,"html_url":"https://github.com/paramsiddharth/linked-list-cpp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paramsiddharth%2Flinked-list-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paramsiddharth%2Flinked-list-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paramsiddharth%2Flinked-list-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paramsiddharth%2Flinked-list-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paramsiddharth","download_url":"https://codeload.github.com/paramsiddharth/linked-list-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240250473,"owners_count":19771797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T23:13:09.608Z","updated_at":"2025-02-27T18:23:26.998Z","avatar_url":"https://github.com/paramsiddharth.png","language":"C++","readme":"# Linked List\nA fully-functional implementation of a linked list in C++.\n\n## Usage\nThe header file `linked_list` may simply be included to access `Param::List\u003cT\u003e`.\n``` cpp\n#include \"linked_list\"\n```\n### `Param::Node\u003cT\u003e`\nThis class represents the individual nodes in a list.\n\n#### Constructor\n``` cpp\nParam::Node\u003cT\u003e::Node(T info = 0, Node\u003cT\u003e NEXT = nullptr)\n```\nAccepts a value for the data (of typename/class `T`) stored in the node, and a pointer for the next node if any.\n\n#### Attributes\n- `T Param::Node::INFO` : The data stored in the node.\n- `Param::Node\u003cT\u003e* Param::Node::NEXT` : The pointer to the next node, or `nullptr` if absent.\n\n### `Param::List\u003cT\u003e`\nThis class represents linked lists.\n\n#### Constructor\n``` cpp\nParam::List\u003cT\u003e::List(Node\u003cT\u003e* HEAD = nullptr)\n```\nAccepts an existing `HEAD` node (of typename/class `T`) to be used in the linked list.\n\n#### Destructor\n``` cpp\nParam::List\u003cT\u003e::~List()\n```\nProperly cleans up the dynamically allocated memory previously occupied by the list.\n\n#### Attribute(s)\n- `Node\u003cT\u003e* Param::List::HEAD` : Stores a pointer to the first node, or `nullptr` if the list is empty. It is a private attribute i. e. Not directly accessible.\n\n#### Methods\n- `bool Param::List::isEmpty()` : Check if the list is empty.\n- `void Param::List::insertEnd(T info)` : Insert a new node at the end of the list with data `info`.\n- `void Param::List::deleteEnd()` : Delete the last node in the list.\n- `void Param::List::insertBeginning(T info)` : Insert a new node at the beginning of the list with data `info`.\n- `void Param::List::deleteBeginning()` : Delete the first node in the list.\n- `void Param::List::insertIndex(int index), T info` : Insert `info` at index `index`.\n- `void Param::List::deleteIndex(int index)` : Delete the node at index `index`.\n- `T\u0026 Param::List::getIndex(int index)` : Get a reference to the `INFO` of the node at index `index`. If absent, a new node is automatically created, so accessing invalid indices. A reference is returned to allow assignment.\n- `T\u0026 Param::List::operator [](int index)` : Same as `T\u0026 getIndex(int index)`.\n- `int Param::List::size()` : Returns the number of nodes currently in the list.\n- `void Param::List::show()` : Displays the list into the console as follows\n  ```\n  \u003c 1 2 3 ... n \u003e\n  ```\n  Where 1, 2, 3, ..., n are the values stored in each of the nodes in the list.\n\n## Testing\nRun `make test` using GNU Make.\n``` bash\nmake test\n```\n![Test output](docs/test.png)\n\n## Made with ❤ by Param.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparamsiddharth%2Flinked-list-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparamsiddharth%2Flinked-list-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparamsiddharth%2Flinked-list-cpp/lists"}