I hereby claim:
- I am icecreamhead on github.
- I am icecreamhead (https://keybase.io/icecreamhead) on keybase.
- I have a public key ASBB-zexELRmyEeREi5m-xn0CNgPMGXf-5-ad87JJqsK1wo
To claim this, I am signing this object:
class ScoreWordGame { | |
static final String[] wordList = new String[]{"apple", "banana", "cherry", "date", "fig"}; | |
static final Map<Character, Integer> letterScores = Stream.iterate(97, x -> x <= 122, x -> x + 1) | |
.collect(Collectors.toMap(x -> (char) (int) x, x -> x - 96)); | |
static void scoreWordGame(String[] wordList, Map<Character, Integer> letterScores) { | |
Arrays.stream(wordList) | |
.map(w -> new Word(w, w.length() * w.chars().map(c -> letterScores.get((char) c)).sum())) |
I hereby claim:
To claim this, I am signing this object: