Tap here to switch tabs
Problem
Submissions

Problem: Lexicographically Largest String From the Box I

Try to solve the Find the Lexicographically Largest String From the Box I problem.

Statement

You are given a string word and an integer numFriends.

The string word is split into numFriends non empty contiguous substrings such that concatenating them in order produces word.

Return the lexicographically largest substring that can appear among all possible valid splits.

Constraints:

  • 1≤1 \leq word.length ≤5imes103\leq 5 imes 10^3

  • word consists only of lowercase English letters.

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

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Lexicographically Largest String From the Box I

Try to solve the Find the Lexicographically Largest String From the Box I problem.

Statement

You are given a string word and an integer numFriends.

The string word is split into numFriends non empty contiguous substrings such that concatenating them in order produces word.

Return the lexicographically largest substring that can appear among all possible valid splits.

Constraints:

  • 1≤1 \leq word.length ≤5imes103\leq 5 imes 10^3

  • word consists only of lowercase English letters.

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