if (map.containsKey(sum)) { //this means the sum come back to equal to before value. Because there is only -1 and 1, so this means at this step, number of 1 equals to ...