{"id":18792357,"url":"https://github.com/kplanisphere/linked-list-operations","last_synced_at":"2025-06-24T20:06:57.355Z","repository":{"id":241965563,"uuid":"808327971","full_name":"KPlanisphere/linked-list-operations","owner":"KPlanisphere","description":"Proyecto 3 - Estructuras de Datos","archived":false,"fork":false,"pushed_at":"2024-05-30T21:01:36.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T15:14:53.381Z","etag":null,"topics":["algorithm-implementation","circular-linked-list","cpp","data-structures","doubly-linked-list","linked-list","singly-linked-list"],"latest_commit_sha":null,"homepage":"https://linktr.ee/planisphere.kgz","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/KPlanisphere.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,"publiccode":null,"codemeta":null}},"created_at":"2024-05-30T20:53:44.000Z","updated_at":"2024-05-30T21:38:26.000Z","dependencies_parsed_at":"2024-05-30T23:53:58.939Z","dependency_job_id":null,"html_url":"https://github.com/KPlanisphere/linked-list-operations","commit_stats":null,"previous_names":["kplanisphere/linked-list-operations"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KPlanisphere/linked-list-operations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KPlanisphere%2Flinked-list-operations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KPlanisphere%2Flinked-list-operations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KPlanisphere%2Flinked-list-operations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KPlanisphere%2Flinked-list-operations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KPlanisphere","download_url":"https://codeload.github.com/KPlanisphere/linked-list-operations/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KPlanisphere%2Flinked-list-operations/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260044437,"owners_count":22950752,"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":["algorithm-implementation","circular-linked-list","cpp","data-structures","doubly-linked-list","linked-list","singly-linked-list"],"created_at":"2024-11-07T21:19:37.537Z","updated_at":"2025-06-24T20:06:57.285Z","avatar_url":"https://github.com/KPlanisphere.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linked List Operations\n\nThis project implements a linked list in C++ and provides various operations to manipulate the list. The program includes functions to insert and delete elements at both the beginning and end of the list, check if the list is empty, and print the list. It also includes a simple menu-driven interface for user interaction.\n\n## Features\n\n- **Insert at the Beginning**: Adds a new element to the start of the list.\n- **Insert at the End**: Adds a new element to the end of the list.\n- **Delete from the Beginning**: Removes the first element from the list.\n- **Delete from the End**: Removes the last element from the list.\n- **Check if the List is Empty**: Determines if the list contains any elements.\n- **Print the List**: Displays all the elements in the list.\n- **Menu Interface**: Provides a user-friendly interface to perform the above operations.\n\n## Usage\n\nCompile the program using a C++ compiler and run the executable. You will be presented with a menu to choose from various operations.\n\n### Example Commands\n\n1. **Insert at the Beginning**: Enter a value to add to the beginning of the list.\n2. **Insert at the End**: Enter a value to add to the end of the list.\n3. **Delete from the Beginning**: Removes the first element if the list is not empty.\n4. **Delete from the End**: Removes the last element if the list is not empty.\n5. **Print the List**: Prints all elements in the list.\n6. **Check if the List is Empty**: Displays a message indicating if the list is empty.\n7. **Exit**: Terminates the program.\n\n## Code Snippets\n\n### Insert at the Beginning\n```cpp\nvoid insertarInicio(L\u0026 lista, int x) {\n    L p = new(struct nodo);\n    p-\u003einfo = x;\n    p-\u003esig = lista;\n    lista = p;\n}\n```\n\n### Delete from the End\n\n```cpp\nvoid eliminarFinal(L\u0026 lista) {\n    L p = lista;\n    if (p-\u003esig == NULL) {\n        lista = NULL;\n        free(p);\n    } else {\n        while (p-\u003esig-\u003esig != NULL)\n            p = p-\u003esig;\n        free(p-\u003esig);\n        p-\u003esig = NULL;\n    }\n}\n```\n### Menu Interface\n```cpp\nvoid menu() {\n    cout \u003c\u003c \"\\n\\t - - - LISTA - - - \\n\\n\";\n    cout \u003c\u003c \"\\t[1] INSERTAR AL INICIO\" \u003c\u003c endl;\n    cout \u003c\u003c \"\\t[2] INSERTAR AL FINAL\" \u003c\u003c endl;\n    cout \u003c\u003c \"\\t[3] ELIMINAR EL PRIMERO\" \u003c\u003c endl;\n    cout \u003c\u003c \"\\t[4] ELIMINAR EL ULTIMO\" \u003c\u003c endl;\n    cout \u003c\u003c \"\\t[5] IMPRIMIR LISTA\" \u003c\u003c endl;\n    cout \u003c\u003c \"\\t[6] COMPROBAR LISTA VACIA\" \u003c\u003c endl;\n    cout \u003c\u003c \"\\t[7] EXIT\" \u003c\u003c endl;\n    cout \u003c\u003c \"\\n \u003e\u003e \";\n}\n```\n\n## How to Run\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/KPlanisphere/linked-list-operations.git\n    ```\n2. Navigate to the project directory:\n    ```bash\n    cd linked-list-operations\n    ```\n3. Compile the code:\n    ```bash\n    g++ Nodardos.cpp -o linked_list\n    ```\n4. Run the executable:\n    ```bash\n    ./linked_list\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkplanisphere%2Flinked-list-operations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkplanisphere%2Flinked-list-operations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkplanisphere%2Flinked-list-operations/lists"}