Tap here to switch tabs
Problem
Submissions

Problem: Equal Score Substrings

med
30 min
Try to solve the Equal Score Substrings problem.

Statement

Given a string s consisting of lowercase English letters, determine if s can be split into two non empty substrings such that the score of the left substring is equal to the score of the right substring.

The score of a character corresponds to its 11 based alphabetical position, where 'a' has a score of 11, 'b' has a score of 22, and continuing up to 'z' with a score of 2626. The score of a substring is defined as the sum of the scores of all its characters.

Return true if such a split exists, and false otherwise.

Constraints:

  • 2≤2 \leq s.length ≤100\leq 100

  • s consists of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Equal Score Substrings

med
30 min
Try to solve the Equal Score Substrings problem.

Statement

Given a string s consisting of lowercase English letters, determine if s can be split into two non empty substrings such that the score of the left substring is equal to the score of the right substring.

The score of a character corresponds to its 11 based alphabetical position, where 'a' has a score of 11, 'b' has a score of 22, and continuing up to 'z' with a score of 2626. The score of a substring is defined as the sum of the scores of all its characters.

Return true if such a split exists, and false otherwise.

Constraints:

  • 2≤2 \leq s.length ≤100\leq 100

  • s consists of lowercase English letters.