Public
Edited
Dec 6, 2022
Insert cell
Insert cell
Insert cell
Insert cell
CharsProcessed = (msg, window = 4) => {
const input = msg.split("");
let start = 0;
while (new Set(input.slice(start, start + window)).size < window) start += 1;
return {
position: start + window,
text: input.slice(start, start + window).join("")
};
}
Insert cell
SOP = (msg) => CharsProcessed(msg)
Insert cell
testInput.concat(input).map(SOP)
Insert cell
Insert cell
Insert cell
SOM = (msg) => CharsProcessed(msg, 14)
Insert cell
testInput.concat(input).map(SOM)
Insert cell
Insert cell
testInput = [
`mjqjpqmgbljsphdztnvjfqwrcgsmlb`,
`bvwbjplbgvbhsrlpgdmjqwftvncz`,
`nppdvjthqldpwncqszvftbrmjlhg`,
`nznrnfrfntjfmvfwmzdfjlvtqnbhcprsg`,
`zcfzfwzzqfrljwzlrfnpqdbhtmscgvjw`
]
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more