Increasing the current prefixSum index value in map by 1 to count the other perfect squares while traversing further
if ( mp . ContainsKey ( prefixSum [ i ] ) ) { mp [ prefixSum [ i ] ] ++ ; } else { mp . Add ( prefixSum [ i ] , 1 ) ; } } return countSubs ; }