i'm not good at programming and i'm unemployed cause i usually fail this tests 🤣 this is how i solved it but probably my bigO is so bad i looped like 4 or 5 times const longestZeroSeq = (zerosSeq) => { let zeroHolder = ""; let longest = 0; zerosSeq.split("").forEach((number) => { zeroHolder = number == 0 ? zeroHolder + "0" : ""; if (zeroHolder.length > longest) longest = zeroHolder.length; }); return zerosSeq.replace("0".repeat(longest), "#".repeat(longest)); }; console.log(longestZeroSeq("00100010100101")); //001###10100101