{"id":22513602,"url":"https://github.com/emahtab/remove-linked-list-elements","last_synced_at":"2026-02-06T08:40:49.024Z","repository":{"id":79525734,"uuid":"239334649","full_name":"eMahtab/remove-linked-list-elements","owner":"eMahtab","description":"Remove Linked List Elements","archived":false,"fork":false,"pushed_at":"2020-02-09T16:23:43.000Z","size":1,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-01T06:37:07.877Z","etag":null,"topics":["leetcode","linked-list","problem-solving"],"latest_commit_sha":null,"homepage":null,"language":null,"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/eMahtab.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,"zenodo":null}},"created_at":"2020-02-09T16:21:17.000Z","updated_at":"2020-02-09T16:23:59.000Z","dependencies_parsed_at":"2023-05-10T17:30:33.686Z","dependency_job_id":null,"html_url":"https://github.com/eMahtab/remove-linked-list-elements","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eMahtab/remove-linked-list-elements","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMahtab%2Fremove-linked-list-elements","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMahtab%2Fremove-linked-list-elements/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMahtab%2Fremove-linked-list-elements/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMahtab%2Fremove-linked-list-elements/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eMahtab","download_url":"https://codeload.github.com/eMahtab/remove-linked-list-elements/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMahtab%2Fremove-linked-list-elements/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29155651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T07:18:23.844Z","status":"ssl_error","status_checked_at":"2026-02-06T07:13:32.659Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["leetcode","linked-list","problem-solving"],"created_at":"2024-12-07T03:13:38.122Z","updated_at":"2026-02-06T08:40:49.018Z","avatar_url":"https://github.com/eMahtab.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Remove Linked List Elements\n## https://leetcode.com/problems/remove-linked-list-elements\n\nRemove all elements from a linked list of integers that have value val.\n\nExample:\n\nInput:  1-\u003e2-\u003e6-\u003e3-\u003e4-\u003e5-\u003e6, val = 6\nOutput: 1-\u003e2-\u003e3-\u003e4-\u003e5\n\n## Implementation :\n\n```java\n/**\n * Definition for singly-linked list.\n * public class ListNode {\n *     int val;\n *     ListNode next;\n *     ListNode(int x) { val = x; }\n * }\n */\nclass Solution {\n    public ListNode removeElements(ListNode head, int val) {\n        ListNode current = head;\n        ListNode prev = null;\n        \n        while(current != null)  {\n            if(current.val == val){\n                if(prev != null){\n                    prev.next = current.next;\n                } else{\n                    head = current.next;\n                }\n            } else{\n                prev = current;\n            }\n            \n            current = current.next;    \n        }  \n        \n        return head;\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femahtab%2Fremove-linked-list-elements","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femahtab%2Fremove-linked-list-elements","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femahtab%2Fremove-linked-list-elements/lists"}