You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The task description suggests to use partitions but it is wasteful because this should work too:
// Return customers who have more undelivered orders than delivered
fun Shop.getCustomersWithMoreUndeliveredOrders(): Set<Customer> =
customers.filter {
it.orders.count { it.isDelivered } < it.orders.size / 2
}.toSet()
But it is not accepted:
java.lang.AssertionError: The function 'getCustomersWithMoreUndeliveredOrders' is implemented incorrectly
The text was updated successfully, but these errors were encountered:
The task description suggests to use partitions but it is wasteful because this should work too:
But it is not accepted:
The text was updated successfully, but these errors were encountered: