adam-mcneilly
12/01/2017, 6:02 PMstkent
12/01/2017, 6:59 PMkarelpeeters
12/01/2017, 7:00 PMjamie-purchase
12/01/2017, 7:38 PMShawn
12/01/2017, 8:18 PMkarelpeeters
12/01/2017, 10:18 PMsumBy
using if
.holgerbrandl
12/02/2017, 8:20 AMtoInt
initially, but learnt my lesson quickly.holgerbrandl
12/02/2017, 4:31 PMmax
min
instead of folding. See my solution above.holgerbrandl
12/02/2017, 4:33 PMflatMap
to cut down code. And it would also fail (same as mine, but not in @karelpeeters solution) if there would be number duplicates in a row.s.luhmirins
12/04/2017, 10:43 AMval simple = input.map { it.split(" ") }
.map { it.size to it.toSet() }
.map { it.second.size == it.first }
.count { it }
val advanced = input.map { it.split(" ") }
.map { it.size to it.map { it.toCharArray().toSet() }.toSet() }
.map { it.second.size == it.first }
.count { it }
andyb
12/04/2017, 2:54 PMkarelpeeters
12/07/2017, 8:39 PMleaf
🙂.karelpeeters
12/08/2017, 2:52 PMwhen
as the condition of an if
, and finally found a use for anonymous local objects.holgerbrandl
12/08/2017, 3:27 PMkarelpeeters
12/09/2017, 11:37 AMholgerbrandl
12/09/2017, 8:12 PMJan Vomlel
12/09/2017, 10:54 PMmenegatti
12/10/2017, 1:31 PMkarelpeeters
12/11/2017, 9:50 AMfold
wouldn't work for me either @andyb.todd.ginsberg
12/11/2017, 6:24 PMtodd.ginsberg
12/13/2017, 3:02 AMandyb
12/13/2017, 12:01 PMkarelpeeters
12/18/2017, 5:44 PMkarelpeeters
12/18/2017, 11:53 PMandyb
12/19/2017, 3:55 PMtodd.ginsberg
12/22/2017, 2:28 PMtodd.ginsberg
12/25/2017, 2:40 PMtodd.ginsberg
06/03/2018, 3:25 PMJoris PZ
11/21/2018, 7:34 PMJVM: 76, 3, 3, 6, 4, 4, 3, 2, 1, 3 ms
JS: 34, 16, 7, 6, 6, 4, 4, 4, 7, 5 ms
Native: 15, 14, 15, 16, 14, 14, 13, 14, 13, 13 ms
I didn't expect Node to become faster over time, but apparently there's some runtime optimization going on there as welljoelpedraza
11/28/2018, 10:01 PMI looked at the khan academy one. it is weekly, with meatier problemsImplement A* for the _N+1_th time? I did have a bit of fun representing the grid when I realized that a cell has the same amount of neighbors as there are bits in a byte. Was disappointed to find out theres no way to create an array of inline-class-wrapped primitives
joelpedraza
11/28/2018, 10:01 PMI looked at the khan academy one. it is weekly, with meatier problemsImplement A* for the _N+1_th time? I did have a bit of fun representing the grid when I realized that a cell has the same amount of neighbors as there are bits in a byte. Was disappointed to find out theres no way to create an array of inline-class-wrapped primitives
wakingrufus
11/29/2018, 8:05 PM