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

Stats:

CreatedOct 18, 2016
PublishedOct 18, 2016
Warriors Trained7616
Total Skips1163
Total Code Submissions20562
Total Times Completed2894
C# Completions176
Java Completions393
JavaScript Completions659
TypeScript Completions123
F# Completions73
C Completions227
Ruby Completions121
Python Completions679
Haskell Completions70
CoffeeScript Completions10
Swift Completions217
C++ Completions258
COBOL Completions5
Rust Completions37
Go Completions21
Factor Completions7
Total Stars171
% of votes with a positive feedback rating92% of 633
Total "Very Satisfied" Votes548
Total "Somewhat Satisfied" Votes69
Total "Not Satisfied" Votes16
Total Rank Assessments10
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • user5036852 Avatar
  • alchemy Avatar
  • raulbc777 Avatar
  • suic Avatar
  • imjasonmiller Avatar
  • Blind4Basics Avatar
  • wneumann Avatar
  • nomennescio Avatar
  • Voile Avatar
  • hobovsky Avatar
  • trashy_incel Avatar
  • user8436785 Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • Kacarott Avatar
  • razetime Avatar
  • saudiGuy Avatar
Ad