I have the following data structure:
Map<Integer, Map<String,Double>>
----------------
| | a 2 |
| 100 | b 1 |
| | c 2 |
----------------
| | a 2 |
| 101 | c 2 |
----------------
| | a 2 |
| 102 | b 1 |
| | c 2 |
----------------
GOAL: get the ID of the outer map containing the inner map with the maximum size.
For example, 100
or 102
, which both contain an inner map whose size is 3.
How can I use Stream API
, for example?