Question: Students are required to implement a number (i.e., 123, 56789) counting program in C++. The program should accept numbers (i.e., 123, 56789) from the user.
Students are required to implement a number (i.e., 123, 56789) counting program in C++. The program should accept numbers (i.e., 123, 56789) from the user. 1. Implement a special number linked list. Each node of the list will contain following: a. next pointer: pointer to next element in the list b. previous pointer: pointer to previous elements in the list c. digits: the data value (int) (1-9) d. numbers: a pointer to a linked list containing numbers starting from the digit (the data value). e. Twords: Total numbers against each digit. 2. Identify the starting digit (1-9) of the number.
3. Store the numbers in the doubly linked list of the node corresponding to the starting digit. 4. At the end, you should end up with a linked list, with digits (1-9) for example, with each node also containing a pointer to another linked list that has all the numbers starting from the digits and total common numbers count against each digit. 5. Take a look at the example provided in the figure. 6. Provide a display function that prints all the interesting statistics from the list. These include Total numbers Total number starting from each digit. Total common numbers in the doubly linked list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
