Search⌘ K
AI Features

Count the Number of Good Subsequences

Count the Number of Good Subsequences asks you to count nonempty subsequences of a string whose distinct characters all occur equally often, returning the result modulo a large prime.

Statement

Count and return the number of good subsequences in the given string s. You may return the modulo ...