Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for [old] Long Repeat by nlupton
"use strict";
const longRepeat = str =>
(str.match(/(.)\1*/g) || [])
.reduce( (r,c) => c && c.length > r ? c.length : r, 0)
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"?');
}
Dec. 31, 2018