Double brace initialisation in Java
Tada
Map<Integer, Integer> map = new HashMap<>();
map.put(0, -1);
is same as:
//Map<Integer, Integer> map = new HashMap<>();;
How?
It is actually called double brace initalisation which is discussed in https://leetcode.com/problems/continuous-subarray-sum/solutions/99499/java-o-n-time-o-k-space/?orderBy=most_votes comments