https://kotlinlang.org logo
k

karelpeeters

12/05/2018, 3:22 PM
.map{}.flatten()
is
.flatMap {}
simple smile
a

andyb

12/05/2018, 3:22 PM
true 🙂
k

karelpeeters

12/05/2018, 3:23 PM
Oh you calculate all possible pairs and check for those. That's an interesting approach!
Oh you calculate all possible pairs and check for those, that's an interesting approach!
a

andyb

12/05/2018, 3:24 PM
Yep, but the approach that Todd took with the Stack is much more efficient.
k

karelpeeters

12/05/2018, 3:25 PM
It uses a stack, now I get it. I had some trouble with the fold obfustication simple smile
a

andyb

12/05/2018, 3:26 PM
He is using a MutableList as a Stack where you check each char against the top of the Stack
k

karelpeeters

12/05/2018, 3:26 PM
Right, I'm going to try to do that in an optimized way now.
7 Views