Delete All Occurrences of a Given Key in Doubly Linked List Problem

Delete All Occurrences of a Given Key in Doubly Linked List Problem — ExecCode Easy DSA Practice

Solve the Delete All Occurrences of a Given Key in Doubly Linked List problem on ExecCode. Free online easy DSA practice in Linked List. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Description You are given the input needed to solve Delete All Occurrences of a Given Key in Doubly Linked List. Your task is to compute the required answer and return JSON array of remaining values. A number or sequence is stored node by node. In Delete All Occurrences of a Given Key in Doubly Linked List, each step must preserve the order of nodes while solving the required operation. nums: list values; key: value to remove.

Examples

Input {"nums": [1, 2, 2, 3], "key": 2}; Output [1, 3]

Constraints

1 <= len(nums) <= 10^4

Practice Delete All Occurrences of a Given Key in Doubly Linked List free on ExecCode. Browse DSA problems, topic map, and placement guides.