LeetCodeLonger Contiguous Segments of Ones than ZerosLonger Contiguous Segments of Ones than ZerosEasyStringSolution export function checkZeroOnes(s: string): boolean { function getMaxLength(arr: string[]) { return arr.reduce((prev, s) => Math.max(prev, s.length), 0); } return getMaxLength(s.split(/0+/)) > getMaxLength(s.split(/1+/)); }LeetCodeLonger Contiguous Segments of Ones than Zeroshttps://leetcode.com/problems/longer-contiguous-segments-of-ones-than-zeros