Yeah! Now, I see that I could use "prev" variable instead "char" to return final result. It would be more sophisticated solution. Thanks for help!
You are not making use of the functionality of reduce (the accumulator or initial value is left unused). But it's nice to see someone else using reduce for this :-) Feel free to look at my solution how to use the accumulator.
Hard to find solutions from people who actually know what they are doing. Good job!
Loading collection data...
Yeah! Now, I see that I could use "prev" variable instead "char" to return final result. It would be more sophisticated solution. Thanks for help!
You are not making use of the functionality of reduce (the accumulator or initial value is left unused). But it's nice to see someone else using reduce for this :-) Feel free to look at my solution how to use the accumulator.
Hard to find solutions from people who actually know what they are doing. Good job!