Add one to a number represented as linked list(DUBLICATE PROBLEM) (Deleted)
Submissions: 0   Accuracy:

0%

  Difficulty: Easy   Marks: 2

Given a Linked List add 1 to it. Complete the given function and return the head of the link list after adding 1 to it. 

Input:

You have to complete the method which takes 1 argument: the head of the  linked list  .You should not read any input from stdin/console. There are multiple test cases. For each test case this method will be called individually.

Output:

Your function should return a pointer to a linked list with no duplicate element.

Constraints:

 

1<=T<=100
1<=size of linked lists<=50

Note: If you use "Test" or "Expected Output Button" use below example format.
Example:

Input

1 9 9 9

Output

2 0 0 0

** For More Input/Output Examples Use 'Expected Output' option **

Author: bhawnamait


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.