m2skills

add one ll output

Jan 28th, 2018
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. Program to add one to a number represented by Linked List
  2. 1 --> 2 --> 3 --> 4 --> 5 --> 6 --> 7 --> 8
  3. Number after adding one is :
  4. 1 --> 2 --> 3 --> 4 --> 5 --> 6 --> 7 --> 9
  5.  
  6. Program to add one to a number represented by Linked List
  7. 9 --> 9 --> 9 --> 9 --> 9 --> 9 --> 9 --> 9
  8. Number after adding one is :
  9. 1 --> 0 --> 0 --> 0 --> 0 --> 0 --> 0 --> 0 --> 0
Add Comment
Please, Sign In to add comment