Skip to content

Instantly share code, notes, and snippets.

@kswlee
Created April 5, 2013 13:26
Show Gist options
  • Select an option

  • Save kswlee/5319252 to your computer and use it in GitHub Desktop.

Select an option

Save kswlee/5319252 to your computer and use it in GitHub Desktop.
function cksLongestPlateau(data) {
var length = 1;
for (var i = 1; i < data.length; ++i) {
if (data[i] == data[i - length])
++length;
}
return length;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment