Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
match sort solution in Clear category for [old] Long Repeat by 0lexa
"use strict";
const longRepeat = line =>
(line.match(/(.)\1*/g) || [[]]).sort((a, b) => b.length - a.length)[0].length;
var assert = require('assert');
if (!global.is_checking) {
assert.equal(longRepeat('sdsffffse'), 4, "First")
assert.equal(longRepeat('ddvvrwwwrggg'), 3, "Second")
console.log('"Run" is good. How is "Check"?');
}
Jan. 29, 2020