---
title: "Discussion on \"GFG POTD - Remove all occurences of duplicates in a linked list\" | Hashnode"
description: "Discussion on \"GFG POTD - Remove all occurences of duplicates in a linked list\". Given a sorted linked list, delete all nodes that have duplicate numbers (all occurrences), leaving only numbers that appear once in the original list, and return the head of the modified linked list. \nExamples:\nInput: Linked List = 23->28->28->35->4..."
url: "https://hashnode.com/posts/gfg-potd-remove-all-occurences-of-duplicates-in-a-linked-list/6684eff4d6149e8f32ea3c7a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [GFG POTD - Remove all occurences of duplicates in a linked list](https://mahekgor.hashnode.dev/gfg-potd-remove-all-occurences-of-duplicates-in-a-linked-list?utm_source=hashnode&utm_medium=feed)

Given a sorted linked list, delete all nodes that have duplicate numbers (all occurrences), leaving only numbers that appear once in the original list, and return the head of the modified linked list. Examples: Input: Linked List = 23->28->28->35->4...

Jul 3, 2024 · 3 min read · mahekgor.hashnode.dev  
Read the article

-   [#geeksforgeek](https://hashnode.com/tag/geeksforgeek)
-   [#problem-solving](https://hashnode.com/tag/problem-solving)
-   [#cpp](https://hashnode.com/tag/cpp)
-   [#linkedlists](https://hashnode.com/tag/linkedlists)

## Written by

[Mahek Gor](https://hashnode.com/@MahekGor)

@MahekGor · Gandhinagar, India

  
[View profile](https://hashnode.com/@MahekGor)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
