Problem of the Day
A new programming or logic puzzle every Mon-Fri

Popular Letters

Welcome to Monday!

Today's objective is to load up a dictionary and find the most popular letters. For bonus points you can figure out the most popular combinations of two letters next to each other.

Permalink: http://problemotd.com/problem/popular-letters/

Comments:

  • Eddy - 9 years, 11 months ago

    My solution in C. I expanded the definition of "two letters next to each other" to repeating letters in general. Here are some of the results the program generated using the word list shipped with OS X Yosemite:

    A:    199,554 | repeated:      124
    B:     40,433 | repeated:      927
    C:    103,440 | repeated:    1,524
    D:     68,191 | repeated:    1,034
    E:    235,331 | repeated:    3,994
    F:     24,165 | repeated:    1,744
    G:     47,094 | repeated:    1,139
    H:     64,356 | repeated:       74
    I:    201,032 | repeated:      420
    J:      3,167 | repeated:        2
    K:     16,158 | repeated:       72
    L:    130,463 | repeated:   11,411
    M:     70,680 | repeated:    2,020
    N:    158,743 | repeated:    2,422
    O:    170,692 | repeated:    4,679
    P:     78,163 | repeated:    2,022
    Q:      3,734 | repeated:        1
    R:    160,985 | repeated:    3,649
    S:    139,542 | repeated:   14,427
    T:    152,831 | repeated:    3,232
    U:     87,353 | repeated:       27
    V:     20,177 | repeated:       12
    W:     13,864 | repeated:       57
    X:      6,932 | repeated:        0
    Y:     51,681 | repeated:        4
    Z:      8,460 | repeated:      271
    Most frequent letter: E
    Most repeating letter: S
    

    reply permalink

Content curated by @MaxBurstein