#3707
Equal Score Substrings
pupil · 410 · lc easy +25 · 56.7% accepted · 39 likes · top 51%
Description
Given a lowercase string s where each character scores its 1-indexed alphabet position ('a' = 1, ..., 'z' = 26), return true if there exists an index i splitting s into two non-empty parts with equal scores, otherwise return false.
Code
1
2
3