Triple Trouble
Create a function that will return a string that combines all of the letters of the three inputed strings in groups. Taking the first letter of all of the inputs and grouping them next to each other. Do this for every letter, see example below!
Ex) Input: "aa", "bb" , "cc" => Output: "abcabc"
Note: You can expect all of the inputs to be the same length.
You are welcome to solve the challenge in any language. I just don't know how to solve it with Elixir.
Top comments (7)
Spoiler:
Guys on reddit helped me with the problem.
My final solution is this:
You can add a "elixir" after 3 symbols to get color. Your solution is quite good for read.
Thanks, I added the colors.
I think I'm getting closer.
Input "what", "what", "what"
Incorrect output ["ttt", "att", "htt", "wtt"]
Here's what I've got so far:
I need to make an expression out of Enum.at(second, 0) so it actually gives the right index. Don't know how to do that yet.
List comprehensions are too much of an overdue, they produce more things to deal with than an actual solution.
Thinking of another solution.
While, I was eating I had an idea. I haven't thought of list comprehensions. I'm gonna try them now and see if it will solve the problem.