Learn basic concept of c , c++ and python programming in regularcodes.com
Count occurrence of given node in linked list
Suppose given linked list contain following nodes.
Input : 1 2 3 4 5 6 4 1 1
Find occurrence one.
Output: Occurrence of  is 3
View insertion process.
use one integer count variable and assign the value is 0. And use one temp pointer that is point to first node of linked list. help of temp pointer visit all other linked list node. if node value are equal to occurrence value then modifying count variable and increment by one.
Note that not given all step of execution process here.View How to insert linked list element and so on.
C program to count occurrence of a given node in linked list.