The best programmers are not marginally better than merely good ones. They are an order-of-magnitude better, measured by whatever standard: conceptual creativity, speed, ingenuity of design, or problem-solving ability. Randall E. Stross

Counts the number of repeat elements

Language Java | Level Intermediate | Category Data structure | September 5, 2015 10:19 pm


Data structure Description

Write program to count the repeated items from the singly linked list.

Example, 12->34->56->12->67->34-NULL
Output { 12=2, 34=2,56=1,67=1}


Output

   					 

Print the list of items: 21->52->33->21->67->33->21->NULL
Linked list items with count :{ 21=3, 52=1, 33=2, 67=1}

				    

Comments


No comments available!

Please login to add comments.