2981专题

leetcode 2981.找出出现至少三次的最长子特殊字符串(纯哈希表暴力)

leetcode 2981.找出出现至少三次的最长子特殊字符串(传送门) class Solution {public:int maximumLength(string s) {int hash[30][52] = { 0 },len = 1,maxn=0;char last = 'A';for (char ch : s) {if (ch == last) len++;else len = 1