Encrypt
Problem Overview
- Implement encrypt(text) that returns the input encrypted with a Caesar cipher rotated by 4 characters; classic interview question.
- Input: uppercase A–Z string of length 1–100; Output: encrypted string; Java method signature is provided.
- Domain: simple text encryption from classical cryptography and basic cybersecurity.
- This coding interview problem focuses on correct handling of characters and rotation; no company specified.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
