Draft
Arrange palindrome
10 of 11davidNge
Description:
Given an array of numbers, re-arrange them in such a way that it is palindrome.
From wikipedia: A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward or forward.
Example input: [12,12,10,10,8], Expected output: [12,10,8,10,12]
Example input: [1,1,2,2,3,3,4], Expected output: [3,2,1,4,1,2,3]
Example input: [7,7,7,7,3,3,2,2,4,5,5], Expected output: [7,7,5,3,2,4,2,3,5,7,7]
There are 2 rules:
All input for test cases can be re-arranged into a palindrome.
With the exception of the array element at the center, the outer most array element is the largest integer, and is in descending order as it gets closer to the center.
Similar Kata:
Stats:
Created | Jan 30, 2016 |
Warriors Trained | 25 |
Total Skips | 0 |
Total Code Submissions | 81 |
Total Times Completed | 11 |
JavaScript Completions | 10 |
Ruby Completions | 2 |
Python Completions | 1 |
Total Stars | 2 |
% of votes with a positive feedback rating | 0% of 0 |
Total "Very Satisfied" Votes | 3 |
Total "Somewhat Satisfied" Votes | 0 |
Total "Not Satisfied" Votes | 1 |