Skip to content

Instantly share code, notes, and snippets.

@alunov-equinix
Created September 13, 2020 13:24
Show Gist options
  • Save alunov-equinix/60a9ab65f98e945cb330cc1ce1761744 to your computer and use it in GitHub Desktop.
Save alunov-equinix/60a9ab65f98e945cb330cc1ce1761744 to your computer and use it in GitHub Desktop.
Tests for get-unique-substr-lengths.js
getUniqueSubstrLengths(''); // result -> []
getUniqueSubstrLengths('a'); // result -> [1]
getUniqueSubstrLengths('ab'); // result -> [1, 1]
getUniqueSubstrLengths('abc'); // result -> [1, 1, 1]
getUniqueSubstrLengths('abobc'); // result -> [1, 3, 1]
getUniqueSubstrLengths('aazz'); // result -> [2, 2]
getUniqueSubstrLengths('ababdeedhigthtdfgfdgbjxfvsdpkcweqfkoeriovsmxpoozzzzz'); // result -> [47, 5]
getUniqueSubstrLengths('hkjljlkklkjlk'); // result -> [1, 12]
getUniqueSubstrLengths('ababdeeda'); // result -> [9]
getUniqueSubstrLengths('ababdeedhigtht'); // result -> [4, 4, 6]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment