Chemistry, asked by snekan26, 7 months ago

what is the frequency of elements

Answers

Answered by sj4362860
1

Answer:

please mark brainliest answer

Explanation:

Input : arr[] = {10, 20, 20, 10, 10, 20, 5, 20}

Output : 10 3 20 4 5 1

Input : arr[] = {10, 20, 20}

Output : 10 1 20 2

Answered by shambhavi12102005121
0

Answer:

the frequency of elements:The frequency of an element can be counted using two loops. One loop will be used to select an element from an array, and another loop will be used to compare the selected element with the rest of the array. Initialize count to 1 in the first loop to maintain a count of each element.

Similar questions