https://kotlinlang.org logo
t

timurnav

12/20/2017, 10:53 PM
Hi, folks! Could you please explain me one little thing. How can I remove consecutive duplicates in a list? Only one item from each pair must be removed. ie:
11
->
1
333
->
33
1122
->
12
1234
->
1234
1223334444
->
123344
it's a very simple to implement in java, using iteration with explicit index declaration, but I want to use Kotlin