Some stories, including "quotes" from people interviewed in the early 20th century who were early telegraph operators, reveal they literally learned the code while waiting several hours in line -- at least well enough to pass the test when they got to the front of the line.
Now I can believe that - especially the last part, depending on what the test was. I've seen too many people in military code school who took a whole lot longer to believe that anyone can do that or even that very many people did it. Yes, there was motivation in the military. Flunk out and you are headed to a ship to swab decks for a living. They used to give an "aptitude" test to see how long it took you to learn a few characters before assigning you to the school.