Implement a method countValue() that counts the number of times an item occurs in a linked list. Remember to use the STL < list >

int countValue(list< int > front ,const int item);

Generate 20 random numbers in the range of 0 to 4, and insert each number in the linked list. Output the list by using a method which you would call writeLinkedList which you would add to the ListP.cpp.

In a loop, call the method countValue() , and display the number of occurrences of each value from 0 to 4 in the list.

Remember that all the above is to be included in the file ListP.ccp

Run: 2 3 4 0 1 0 2 4 2 3 3 4 3 3 3 0 0 2 0 2
0 : 5, 1 : 1, 2 : 5, 3 : 6, 4 : 3
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.