6 kyu

Your order, please

19,207 of 177,825iamstone

Description:

Your task is to sort a given string. Each word in the string will contain a single number. This number is the position the word should have in the result.

Note: Numbers can be from 1 to 9. So 1 will be the first word (not 0).

If the input string is empty, return an empty string. The words in the input String will only contain valid consecutive numbers.

Examples

"is2 Thi1s T4est 3a"  -->  "Thi1s is2 3a T4est"
"4of Fo1r pe6ople g3ood th5e the2"  -->  "Fo1r the2 g3ood 4of th5e pe6ople"
""  -->  ""
Strings
Fundamentals

More By Author:

Check out these other kata created by iamstone

Stats:

CreatedAug 7, 2015
PublishedAug 7, 2015
Warriors Trained336564
Total Skips46372
Total Code Submissions548772
Total Times Completed177825
Python Completions69606
JavaScript Completions67533
Java Completions19207
Rust Completions2052
Haskell Completions1277
TypeScript Completions3789
C# Completions10117
R Completions211
Scala Completions549
Ruby Completions3601
Julia Completions82
Lua Completions199
C Completions519
COBOL Completions6
Factor Completions11
Go Completions1209
D Completions5
Groovy Completions19
Total Stars4122
% of votes with a positive feedback rating91% of 14787
Total "Very Satisfied" Votes12464
Total "Somewhat Satisfied" Votes2130
Total "Not Satisfied" Votes193
Ad
Contributors
  • iamstone Avatar
  • ZozoFouchtra Avatar
  • joh_pot Avatar
  • Unnamed Avatar
  • CrazyMerlyn Avatar
  • anter69 Avatar
  • Fabianopb Avatar
  • yuleeque Avatar
  • aweleshetu Avatar
  • imjasonmiller Avatar
  • kazk Avatar
  • user5036852 Avatar
  • JohanWiltink Avatar
  • lilsweetcaligula Avatar
  • Voile Avatar
  • Souzooka Avatar
  • mentalplex Avatar
  • hobovsky Avatar
  • xavierguihot Avatar
  • stellartux Avatar
  • trashy_incel Avatar
  • ejini战神 Avatar
  • theDissilent Avatar
  • akar-0 Avatar
  • Kacarott Avatar
  • tri@ Avatar
  • sid114 Avatar
  • FranzMartyn Avatar
  • KayleighWasTaken Avatar
Ad