214. Translate to Pig Latin
Easy · String
Pig Latin is a word game: move the first letter to the end and add 'ay'. For example: 'python' → 'ythonpay'. Write a function to translate a single lowercase word.
Examples
Example 1 Input: word = "python" Output: "ythonpay" Explanation: 'p' moved to end + 'ay'
Example 2 Input: word = "code" Output: "odeay" → wait, just "odeay"? No: "odecay" Explanation: First letter 'c' → 'odeay' wait: c + 'ode' → 'odecay'
Constraints
- Word is lowercase, 1 ≤ len(word) ≤ 20