hi there
does anyone know when you are streaming through a list, how do you make a sublist that goes from element 1 to the final element
List<Integer> timeNumbers =
Arrays.stream(s.split("\n")[0].split(" ")).filter(b -> !(b.isEmpty())).collect(Collectors.toList()).subList(1, 5).stream().map(Integer::valueOf).collect(Collectors.toList());
i was trying to make this list of integers from this input:
Time: 57 72 69 92
Distance: 291 1172 1176 2026
(for advent of code)