Number of Substrings with All Zeroes

Problem Description Given a string str containing only 0 or 1, please return the number of substrings that consist of 0. 1 <= |str| <= 30000 Example Example 1: Input: "00010011" Output: 9 Explanation: There are 5 substrings of "0", There are 3 substrings of "00", There is 1 substring of "000". So return 9 Example 2: Input: "010010" Output: 5 Solution Solution 1 - Two Pointers "000" => 1