Tap here to switch tabs
Problem
Submissions

Problem: Substrings of Size Three with Distinct Characters

med
30 min
Try to solve the Substrings of Size Three with Distinct Characters problem.

Statement

A string is considered good if all of its characters are distinct.

Given a string s, return the total number of good substrings of length 33 contained in s.

Note: If a good substring occurs multiple times, each instance is counted separately.

Constraints:

  • 1≤1 \leq s.length ≤100\leq 100

  • s consists of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Substrings of Size Three with Distinct Characters

med
30 min
Try to solve the Substrings of Size Three with Distinct Characters problem.

Statement

A string is considered good if all of its characters are distinct.

Given a string s, return the total number of good substrings of length 33 contained in s.

Note: If a good substring occurs multiple times, each instance is counted separately.

Constraints:

  • 1≤1 \leq s.length ≤100\leq 100

  • s consists of lowercase English letters.