Link Search Menu Expand Document

Letter Frequency

Find the letter frequency of the Armenian alphabet in Raffi’s “Samvel” novel. For that you’ll need to:

  1. Download the novel here.
  2. Google how to read the contents of the file (note the encoding of the file you’ve downloaded).
  3. Create an array of integers, items of which will hold the counters for frequencies of the corresponding letter (convert the letters to lowercase first)
  4. Iterate over the text and increment the correct counter when encountering a letter.
  5. Return the resulting array.