Question: 2 Note: Implement it in C++ Students are required to implement a number (i.e., 123, 56789) counting program in C++. The program should accept numbers

2

Note: Implement it in C++

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:
    1. next pointer: pointer to next element in the list
    2. previous pointer: pointer to previous elements in the list
    3. digits: the data value (int) (1-9)
    4. numbers: a pointer to a linked list containing numbers starting from the digit (the data value).
    5. 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

 2 Note: Implement it in C++ Students are required to implement

5

CLO 3

.... ME -E2)

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!