Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions