Delete N-th Node from End Problem
Delete N-th Node from End Problem — ExecCode Easy DSA Practice
Solve the Delete N-th Node from End 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 N-th Node from End. Your task is to compute the required answer and return list after deletion, space-separated. A number or sequence is stored node by node. In Delete N-th Node from End, each step must preserve the order of nodes while solving the required operation. nums: list; n: position from end.
Examples
Input {"nums": [1, 2, 3, 4, 5], "n": 2}; Output 1 2 3 5. Input {"nums": [1, 2, 3, 4, 5], "n": 5}; Output 2 3 4 5. Input {"nums": [1, 2, 3, 4, 5], "n": 1}; Output 1 2 3 4
Constraints
1 <= n <= len(nums) <= 30
Practice Delete N-th Node from End free on ExecCode. Browse DSA problems, topic map, and placement guides.