Easy Encryption and Decryption
Asked at General Motors · Coding Questions · Difficulty: Easy
Write an encryption and decryption algorithm. Given a string, encrypt it with a specified offset and then decrypt it back. The encryption uses a simple shift method, like the Caesar cipher. Input is a string and an offset, output is the encrypted string and the original string after decryption. It should handle various character types, including letters, numbers, and punctuation.
Loading the problem…
More General Motors interview questions
- Data Structures Characteristics
- Come Looking for the Smallest Num Which Must Be > Than a Specific Num.
- Two-Team Turn-Based Battle Simulator
- Toy Language Type System
- Grid Infection and Immunity Simulation
- Earliest Supporting Version with a Probe Budget