Computer Science, asked by konok1142, 1 month ago

write a program to searh te alphabetdata from the array items​

Answers

Answered by dhanushree2411
1

Answer:

Input : arr[] = {6, 5}

Output : A

In this example, we can take 6 and 5

as 65 that gives us A.

Input : arr[] = {5, 6, 6}

Output : A B

Here we can take 6 and 5 as 65 to make A.

And 6 and 6 as 66 to make B.

Input : arr[] = {1, 0, 1, 0}

Output: d e n

Here we can take 1, 0 and 0 as 100 to make d.

1, 0 and 1 as 101 to make e. And

1, 1, and 0 as 110 to make n.

Recommended: Please try your approach on {IDE} first, before moving on to the solution.

Explanation:

Approach :

The approach is to iterate a loop from char A to Z and check whether both the digits of their ASCII values (ASCII value of A is 65 and digits of ASCII value for A is 6 and 5) exist in the array or not. For this we have to calculate frequency of each element of the array. Same as for small alphabets.

Below is the implementation of the above approach.

Similar questions