Tap here to switch tabs
Problem
Submissions

Problem: Splitting a String Into Descending Consecutive Values

med
30 min
Try to solve the Splitting a String Into Descending Consecutive Values problem.

Statement

Given a string s composed only of digits, determine whether s can be partitioned into at least 22 non empty substrings such that the numeric value of each substring is strictly 11 less than the numeric value of the substring immediately preceding it.

Return true if such a partition is possible, or false otherwise.

Constraints:

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

  • s consists only of digits.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Splitting a String Into Descending Consecutive Values

med
30 min
Try to solve the Splitting a String Into Descending Consecutive Values problem.

Statement

Given a string s composed only of digits, determine whether s can be partitioned into at least 22 non empty substrings such that the numeric value of each substring is strictly 11 less than the numeric value of the substring immediately preceding it.

Return true if such a partition is possible, or false otherwise.

Constraints:

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

  • s consists only of digits.