Tap here to switch tabs
Problem
Submissions

Problem: Generalized Abbreviation

Generalized Abbreviation asks you to return all possible abbreviations of a word, formed by replacing any number of disjoint, nonadjacent substrings with their lengths.

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

Generalized Abbreviation asks you to return all possible abbreviations of a word, formed by replacing any number of disjoint, nonadjacent substrings with their lengths.

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.