Tap here to switch tabs
Problem
Submissions

Problem: Generalized Abbreviation

Try to solve the Generalized Abbreviation problem.

Statement

Given a string word, return a list of all possible generalized abbreviations of word. The abbreviations can be returned in any order.

A generalized abbreviation is formed by replacing any number of disjoint, nonadjacent substrings of word with their respective lengths.

Constraints:

  • 1≤1 \leq word.length ≤15\leq 15

  • word consists of only lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Generalized Abbreviation

Try to solve the Generalized Abbreviation problem.

Statement

Given a string word, return a list of all possible generalized abbreviations of word. The abbreviations can be returned in any order.

A generalized abbreviation is formed by replacing any number of disjoint, nonadjacent substrings of word with their respective lengths.

Constraints:

  • 1≤1 \leq word.length ≤15\leq 15

  • word consists of only lowercase English letters.