Sobes.tech

How to minimize backend memory load when reading data from the database, grouping, and sending a file to the frontend?

156

```java import java.util.*; import java.lang.*; import java.io.*; class Codechef { public static void main (String[] args) throws java.lang.Exception { var autoNumbers = List.of(List.of("A123BC", "B421FT"), List.of("O543EC","B421FT", "I222OA")); autoNumbers.stream().flatMap(Collection::stream).flatEach(System.out/System.out.println()); Map<String, String> numberMap = autoNumbers.stream().flatMap(Collection::stream).collect(Collectors.toMap( n -> n, n -> n.replaceAll("[^0-9]", ""))); System.out.println(numberMap); } } ```

141

//list of car license plates, numbers are always of a standard type // need to output each number separately to the console // then create a map of the number - its digits (example A123BC:123) where the key is A123BC and the value is 123 //var autoNumbers = List.of(List.of("A123BC", "B421FT"), List.of("O543EC", "B421FT", "I2220A"));

139