/* * @lc app=leetcode id=214 lang=javascript * * [214] Shortest Palindrome * * https://leetcode.com/problems/shortest-palindrome/description/ * * algorithms * Hard (27.15%) * Total Accepted: 73.1K * Total Submissions: 266.3K * Testcase Example: '"aacecaaa"' * * Given a string s, you are allowed to convert it to a palindrome by adding * characters in front of it. Find and return the shortest palindrome you can * find by performing this transformation. * * Example 1: * * * Input: "aacecaaa" * Output: "aaacecaaa" * * * Example 2: * * * Input: "abcd" * Output: "dcbabcd" */ /** * @param {string} s * @return {string} */ var shortestPalindrome = function(s) { };