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