1624. Largest Substring Between Two Equal Characters
Description
**Input:** s = "aa"
**Output:** 0
**Explanation:** The optimal substring here is an empty substring between the two 'a's.**Input:** s = "abca"
**Output:** 2
**Explanation:** The optimal substring here is "bc".**Input:** s = "cbzxy"
**Output:** -1
**Explanation:** There are no characters that appear twice in s.**Input:** s = "cabbac"
**Output:** 4
**Explanation:** The optimal substring here is "abba". Other non-optimal substrings include "bb" and "".ac
Previous1623. All Valid Triplets That Can Represent a CountryNext1625. Lexicographically Smallest String After Applying Operations
Last updated