Search⌘ K
AI Features

Number of Substrings Containing All Three Characters

Number of Substrings Containing All Three Characters counts substrings of a string made from a, b, and c that contain at least one of each character, returning the total.

Statement

Given a string s that consists only of the characters 'a', 'b' ...