Question
Hello, I'm trying to compute the frequency ordering of the letters appearing in the ciphertext, and guess a potential decryption key by mapping them to
Hello,
I'm trying to compute the frequency ordering of the letters appearing in the ciphertext, and guess a potential decryption key by mapping them to the standard English letter frequency ordering: ETAOINSHRDLCUMWFGYPBVKJXQZ. I'm doing this in C++ and I was thinking of just getting each character at a time and passing it thorugh a switch statement where a counter would get incremented for each letter. I just feel like there might be a more efficient way of counting the frequency of a letter. Is there? If there isn't it's okay I was just curious.
Also, how is a switch statement more efficient than an if statement? I'm a little foggy on that.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started