---
title: "Discussion on \"Number of Substrings Containing All Three Characters\" | Hashnode"
description: "Discussion on \"Number of Substrings Containing All Three Characters\". Problem\nGiven a string s consisting only of characters a, b and c.\nReturn the number of substrings containing at least one occurrence of all these characters a, b and c. link\nExample 1:\nInput: s = \"ab"
url: "https://hashnode.com/posts/number-of-substrings-containing-all-three-characters/6af19249f2a16b5b3eb0da23"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Number of Substrings Containing All Three Characters](https://chetan77.hashnode.dev/number-of-substrings-containing-all-three-characters?utm_source=hashnode&utm_medium=feed)

Problem Given a string s consisting only of characters a, b and c. Return the number of substrings containing at least one occurrence of all these characters a, b and c. link Example 1: Input: s = "ab

Nov 9 · 5 min read · chetan77.hashnode.dev  
Read the article

## Written by

[Chetan Datta](https://hashnode.com/@chetan77)

@chetan77 · Hyderabad, India

  
[View profile](https://hashnode.com/@chetan77)

Software Engineer

I share my learnings here. Thanks for reading.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
