Repository Analysis

trekhleb/javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

0.7 Likely human-written View on GitHub
0.7
Adjusted Score
0.7
Raw Score
100%
Time Factor
2026-05-28
Last Push
196,005
Stars
JavaScript
Language
55,098
Lines of Code
620
Files
37
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 0LOW 37

Pattern Findings

37 matches across 4 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers18 hits · 18 pts
SeverityFileLineSnippet
LOW…nary-search-tree/__test__/BinarySearchTreeNode.test.js209 function removeNotExistingElementFromTree() {
LOW…algorithms/tree/depth-first-search/depthFirstSearch.js43export function depthFirstSearchRecursive(node, callbacks) {
LOW…thms/linked-list/reverse-traversal/reverseTraversal.js11function reverseTraversalRecursive(node, callback) {
LOW…lgorithms/graph/depth-first-search/depthFirstSearch.js48function depthFirstSearchRecursive(graph, currentVertex, previousVertex, callbacks) {
LOW…thms/graph/eulerian-path/__test__/eulerianPath.test.js8 function findEulerianPathInNotEulerianGraph() {
LOW…/detect-cycle/detectUndirectedCycleUsingDisjointSet.js8export default function detectUndirectedCycleUsingDisjointSet(graph) {
LOW…algorithms/graph/hamiltonian-cycle/hamiltonianCycle.js56function hamiltonianCycleRecursive({
LOW…ly-connected-components/stronglyConnectedComponents.js8function getVerticesSortedByDfsFinishTime(graph) {
LOW…ly-connected-components/stronglyConnectedComponents.js119export default function stronglyConnectedComponents(graph) {
LOW…ath/euclidean-algorithm/euclideanAlgorithmIterative.js7export default function euclideanAlgorithmIterative(originalA, originalB) {
LOW…h/fourier-transform/inverseDiscreteFourierTransform.js16export default function inverseDiscreteFourierTransform(
LOW…ourier-transform/__test__/fastFourierTransform.test.js10function sequencesApproximatelyEqual(sequence1, sequence2, delta) {
LOW…ommon-subsequence/longestCommonSubsequenceRecursive.js9export default function longestCommonSubsequenceRecursive(string1, string2) {
LOW…orithms/sets/combinations/combineWithoutRepetitions.js6export default function combineWithoutRepetitions(comboOptions, comboLength) {
LOW…st-common-supersequence/shortestCommonSupersequence.js9export default function shortestCommonSupersequence(set1, set2) {
LOW…creasing-subsequence/dpLongestIncreasingSubsequence.js8export default function dpLongestIncreasingSubsequence(sequence) {
LOW…ithms/sets/permutations/permutateWithoutRepetitions.js5export default function permutateWithoutRepetitions(permutationOptions) {
LOW…gular-expression-matching/regularExpressionMatching.js11export default function regularExpressionMatching(string, pattern) {
Fake / Example Data10 hits · 13 pts
SeverityFileLineSnippet
LOW…graphy/polynomial-hash/__test__/PolynomialHash.test.js10 const text = 'Lorem Ipsum is simply dummy text of the printing and '
LOW…graphy/polynomial-hash/__test__/PolynomialHash.test.js11 + 'typesetting industry. Lorem Ipsum has been the industry\'s standard '
LOW…/polynomial-hash/__test__/SimplePolynomialHash.test.js8 const text = 'Lorem Ipsum is simply dummy text of the printing and '
LOW…/polynomial-hash/__test__/SimplePolynomialHash.test.js9 + 'typesetting industry. Lorem Ipsum has been the industry\'s standard '
LOW…lgorithms/string/rabin-karp/__test__/rabinKarp.test.js19 const text = 'Lorem Ipsum is simply dummy text of the printing and '
LOW…lgorithms/string/rabin-karp/__test__/rabinKarp.test.js20 + 'typesetting industry. Lorem Ipsum has been the industry\'s standard '
LOW…lgorithms/string/rabin-karp/__test__/rabinKarp.test.js26 + 'containing Lorem Ipsum passages, and more recently with desktop'
LOW…lgorithms/string/rabin-karp/__test__/rabinKarp.test.js32 expect(rabinKarp(text, 'versions of Lorem Ipsum.')).toBe(549);
LOW…lgorithms/string/rabin-karp/__test__/rabinKarp.test.js33 expect(rabinKarp(text, 'versions of Lorem Ipsum:')).toBe(-1);
LOW…lgorithms/string/rabin-karp/__test__/rabinKarp.test.js34 expect(rabinKarp(text, 'Lorem Ipsum passages, and more recently with')).toBe(446);
Over-Commented Block7 hits · 7 pts
SeverityFileLineSnippet
LOW…st/reverse-traversal/__test__/reverseTraversal.test.js21 });
LOWsrc/algorithms/graph/floyd-warshall/floydWarshall.js41 });
LOWsrc/algorithms/math/bits/fullAdder.js41 // The operands of all bitwise operators are converted to signed
LOWsrc/algorithms/uncategorized/n-queens/nQueensBitwise.js21 // Keeps track of the number of valid solutions.
LOWsrc/algorithms/uncategorized/n-queens/nQueensBitwise.js41 // queen there.
LOWsrc/algorithms/string/z-algorithm/zAlgorithm.js21 // Prefix: ab.......
LOWsrc/algorithms/string/z-algorithm/zAlgorithm.js61 // Calculate corresponding Z box shift. Because we want to copy the values
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippet
LOW…algorithms/graph/hamiltonian-cycle/hamiltonianCycle.js68 // Now we need to check if it is cycle or not.
LOW…gular-expression-matching/regularExpressionMatching.js107 * we need to check if there was a match for the pattern and for the