6 kyu

Simple Fun #78: Build Palindrome

422 of 817myjinxin2015

Description:

Task

Given a string str, find the shortest possible string which can be achieved by adding characters to the end of initial string to make it a palindrome.

Example

For str = "abcdc", the output should be "abcdcba".

Input/Output

  • [input] string str

    A string consisting of lowercase latin letters.

    Constraints: 3 ≤ str.length ≤ 10.

  • [output] a string

Puzzles

Stats:

CreatedFeb 3, 2017
PublishedFeb 3, 2017
Warriors Trained1842
Total Skips35
Total Code Submissions4502
Total Times Completed817
JavaScript Completions296
C# Completions86
Python Completions422
Ruby Completions55
Total Stars40
% of votes with a positive feedback rating97% of 184
Total "Very Satisfied" Votes174
Total "Somewhat Satisfied" Votes10
Total "Not Satisfied" Votes0
Total Rank Assessments9
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • myjinxin2015 Avatar
  • tachyonlabs Avatar
  • hobovsky Avatar
  • dfhwze Avatar
  • Just4FunCoder Avatar
  • saudiGuy Avatar
Ad