What is the best Data Structure(DS)/Class I can use to implement Caesar's Cipher ? This is what I have thought of so far:
- String with all alphabets (abc...zABCD...Z) ?
- Array with alphabets and wraparound ?
- DS which stores a key value pair ?
Why i thought i need 3 - I have to find the character (which is to be encoded) in my "list of numbered alphabets". Then i use that index, and shift it by a number. I thought that it would be faster if i used key value pair instead of searching each index of string or array.