+ 8
***[SUPER_CHALLENGE]*** ver.2.0
Arrange text by contained numbers in its words. For example input: "1i057s I100t0 20a18 9te99xt9 si30mp5L9e" outputs: "It is a simpLe text"
22 Respostas
+ 13
https://code.sololearn.com/cgIV6r6o9v33/?ref=app
+ 10
@dimon..
Thanks-
+ 8
abstract, easy to read, and was already solved a few hours ago (check another challenge for full commentary).
https://code.sololearn.com/w8Yopd2USboD/?ref=app
+ 7
Solved! :-)
https://code.sololearn.com/cc1ATs950tRu/?ref=app
+ 6
Kazy's answer accepted too ))) Beautiful!!!
+ 6
Two statements: first to be able to show the input in the result, but easily it can be inserted into the output line. Try it please. 😊👇
https://code.sololearn.com/c0F112vXwUFQ/?ref=app
Edit: In honor of LukArToDo now also contains explanation.
+ 6
@dimon2101
Thanks for the motivation ☺👍 but I think the SoloLearn compiler for C# isn't very good. For me it works at the third run. Anyway I modified the code to demonstrate your example. See it again, only press submit if you don't want to write a test.
+ 5
Ipang, i think that at first step we see in words only numbers without letters and arrange its position in inputted text. At second step we must throw away digits from words :-)
p.s. there is no pattern, only spaces in input
+ 5
Oh, so we need to extract the numbers first, then strip them from the string, then we place the words depending on the number, ascending, am I understanding correctly? I hope so. I may give it a try.
Thanks : )
+ 5
Thank you, Luc!!! :-D But we have Christmas Eve at 06.01.2018
+ 4
@Dimon2101 I need clarification here,
"I100t0" => It (alphabet at first position, first word)
"1i057s" => is (alphabet at second position, second word)
"20a18" => a (alphabet at third position, third word)
So far this makes a pattern, but the next two,
"si30mp5L9e" => ?? (alphabet at first position)
"9te99xt9" => ?? (alphabet at second position)
What is the pattern? I'm confused here. How to know the order of words in the sentence?
+ 4
Congradulations to Qodirbek!!! C++ for all!!!
+ 4
Marfic's code outputs "Compilation error" on "1i057s I100t0 20a18 9te99xt9 si30mp5L9e". Daniel's program has throw away digits but there is no sorting effect.
You're near from right result, don't give up!!!
+ 4
Guys, look at the Luc's code! Example of clear mind and cool heart )))))))))) And i dont know how it works.... :-/
+ 4
New Crazy Wondering Code from LukArToDo with explanation!!!
+ 3
@dimon2101, I’ll comment the code with explanations later.
Enjoy the christmas day 🙂
+ 2
I think I prefer this version. So, let's see...