Compute Encoded Product Name

Problem Overview

  • Task: Given a lowercase palindrome string, return its lexicographically smallest palindromic permutation (encoded name).
  • Input/Output: nameString (1 ≤ length ≤ 1e5, lowercase letters), output a string; output may equal input if already minimal.
  • Context: Models encoding of symmetrical product names used for data integrity.
  • Company: From Amazon interviews; a coding interview problem often asked as an interview question, titled Compute Encoded Product Name.

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: