Quick Question on Arrays

Hi there,

I am trying to count each specific occurrence of letters in a string and pass the count to an array with 26 values with the corresponding letter.

For example, if my string is “Apples” It would cycle through and add the count of 1 for A in the first array slot, 0 for B, etc.

Through research I understand how to count the occurrences but unsure how to go about passing it to the array. Any help would be great, thank you!

submitted by /u/BrvteRS
[link] [comments]

Leave a Reply