Math Algorithm to Count Substrings With All 1s January 22, 2021 algorithms, math, string No Comments You are given a string s containing “1”s and “0”s. Return the number of substrings that contain only “1”s. Mod the result by 10 ** 9 + 7. Constraints … [Continue Reading...]