This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Delete a Node #84
Comments
I would like to solve it in c++ |
Merged
I would also like to solve this in python & Java |
jaichiranjeeva
added a commit
to jaichiranjeeva/hacktoberfest
that referenced
this issue
Oct 24, 2022
resolves cognizance-amrita#84 Delete_a_node in python.
jaichiranjeeva
added a commit
to jaichiranjeeva/hacktoberfest
that referenced
this issue
Oct 24, 2022
resolves cognizance-amrita#84 Delete_a_node in python & java
Simple-Saviour
added a commit
to Simple-Saviour/hacktoberfest
that referenced
this issue
Oct 27, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Delete the node at a given position in a linked list and return a reference to the head node. The head is at position 0. The list may be empty after you delete the node. In that case, return a null value.
Example
Function Description
Complete the deleteNode function in the editor below.
deleteNode has the following parameters:
Returns
Input Format
The first line of input contains an integer , the number of elements in the linked list.
Each of the next lines contains an integer, the node data values in order.
The last line contains an integer, , the position of the node to delete.
Constraints
Sample Input
Sample Output
Explanation
The original list is
20 -> 6 -> 2 -> 19 -> 7 -> 4 -> 15 -> 9
. After deleting the node at position3
, the list is20 -> 6 -> 2 -> 7 -> 4 -> 15 ->9
.The text was updated successfully, but these errors were encountered: