Question: Bonus Task: ID Generator Write a function idGenerator ( ) that will take three non - dummy headed linear singly linked lists containing only digits

Bonus Task: ID Generator
Write a function idGenerator() that will take three non-dummy headed linear singly linked lists containing only digits from 0-9 and generate another singly linked list with 8 digit student ID from it [The student ID contains only digits from 0 to 9].
The first linked list will have the first four digits of the student id in reverse order. The remaining four digits can be obtained by adding the elements of the second linked list from the beginning with the elements of the third linked list from the beginning.
If the summation is 10, then you have to mod the summation by 10 and insert the result in the output linked list. For example, in sample input 2, the last element of the second list is 7 and the last element of the third linked list is 8. So after adding them we get 7+8=15>10. So the digit we will insert as an element of the Student ID list, will be 15%10=5.
\table[[Sample Input 1:,Sample Input 2:],[0322,0391
 Bonus Task: ID Generator Write a function idGenerator() that will take

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!