Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
josdem committed Apr 7, 2024
2 parents 34c365b + b5bafac commit 9058b46
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion simple-algorithms/birthday-cake-candles/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'java'
}

def junitJupiterVersion = '5.10.1'
def junitJupiterVersion = '5.10.2'

group 'com.josdem.kata'
version '1.0-SNAPSHOT'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;

public class CandleCounter {

public List<Integer> count(List<Integer> candles) {
Optional<Integer> biggest = candles.stream().max(Integer::compare);
return candles.stream().filter(it -> Objects.equals(it, biggest.get())).collect(Collectors.toList());
return candles.stream().filter(it -> Objects.equals(it, biggest.get())).toList();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import static org.junit.jupiter.api.Assertions.assertEquals;

import java.util.Arrays;
import java.util.List;

import org.junit.jupiter.api.DisplayName;
Expand Down

0 comments on commit 9058b46

Please sign in to comment.