6 kyu
Sorting on planet Twisted-3-7
176 of 2,894user5036852
Description:
#Sorting on planet Twisted-3-7
There is a planet... in a galaxy far far away. It is exactly like our planet, but it has one difference: #The values of the digits 3 and 7 are twisted. Our 3 means 7 on the planet Twisted-3-7. And 7 means 3.
Your task is to create a method, that can sort an array the way it would be sorted on Twisted-3-7.
7 Examples from a friend from Twisted-3-7:
[1,2,3,4,5,6,7,8,9] -> [1,2,7,4,5,6,3,8,9]
[12,13,14] -> [12,14,13]
[9,2,4,7,3] -> [2,7,4,3,9]
There is no need for a precheck. The array will always be not null and will always contain at least one number.
You should not modify the input array!
Have fun coding it and please don't forget to vote and rank this kata! :-)
I have also created other katas. Take a look if you enjoyed this kata!
Mathematics
Sorting
Arrays
Algorithms
Similar Kata:
Stats:
Created | Oct 18, 2016 |
Published | Oct 18, 2016 |
Warriors Trained | 7616 |
Total Skips | 1163 |
Total Code Submissions | 20562 |
Total Times Completed | 2894 |
C# Completions | 176 |
Java Completions | 393 |
JavaScript Completions | 659 |
TypeScript Completions | 123 |
F# Completions | 73 |
C Completions | 227 |
Ruby Completions | 121 |
Python Completions | 679 |
Haskell Completions | 70 |
CoffeeScript Completions | 10 |
Swift Completions | 217 |
C++ Completions | 258 |
COBOL Completions | 5 |
Rust Completions | 37 |
Go Completions | 21 |
Factor Completions | 7 |
Total Stars | 171 |
% of votes with a positive feedback rating | 92% of 633 |
Total "Very Satisfied" Votes | 548 |
Total "Somewhat Satisfied" Votes | 69 |
Total "Not Satisfied" Votes | 16 |
Total Rank Assessments | 10 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |