ErrLookup › trekhleb/javascript-algorithms

trekhleb/javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings · JavaScript · 182 source files

Analyzed at 85293e3e2b on 2026-08-24. 31 documented errors.

Code / MessageTypeSeverityTags
Invalid key string length. The square root of the key string
exception error
The message and key string can only contain letters
exception error
Invalid key string length. The key length must be a square o
exception error
This method is not implemented yet
exception error
Eulerian path must contain two odd-ranked vertices
exception error
Kruskal's algorithms works only for undirected graphs
exception error
Prim's algorithms works only for undirected graphs
exception error
Can't handle position smaller than 1 or greater than ${topMa
exception error
Invalid matrix format
exception error
Matrix is not of 2D shape
exception error
Matrices have different dimensions
exception error matrix, shape-validation, math, rank-mismatch
Matrices have different shapes
exception error matrix, shape-validation, math, off-by-one
Matrices have incompatible shape for multiplication
exception error matrix, multiplication, linear-algebra, dimension-mismatch, math
The method supports only positive integers
exception error math, square-root, domain-error, validation
The data is empty
exception error machine-learning, k-means, clustering, null-check, validation
Either dataSet or labels or toClassify were not set
exception error machine-learning, knn, classification, missing-argument, validation
sort method must be implemented
exception error sorting, abstract-method, inheritance, oop
Items and weights must be of the same size
exception error statistics, random-sampling, array-length-mismatch, validation
Items must not be empty
exception error statistics, random-sampling, empty-array, validation
Strings must be of the same length
exception error string, hamming-distance, length-mismatch, validation
One or two values are not in sets
exception error disjoint-set, union-find, precondition, make-set, kruskal
Vertex has already been added before
exception error graph, duplicate-vertex, unique-key, add-vertex
Edge has already been added before
exception error graph, duplicate-edge, unique-key, multigraph, add-edge
Edge not found in graph
exception error graph, delete-edge, precondition, idempotency
Graph vertex must have a value
exception error graph, vertex, constructor, undefined-argument
Cannot construct Heap instance directly
exception error heap, abstract-class, instantiation, typeerror, priority-queue
You have to implement heap pair comparison method
exception error heap, abstract-method, subclassing, priority-queue, data-structures
Item not found in the tree
exception error binary-search-tree, remove, item-not-found, data-structures
Position is out of allowed range
exception error fenwick-tree, binary-indexed-tree, index-out-of-range, off-by-one, data-structures
Left index can not be greater than right one
exception error fenwick-tree, binary-indexed-tree, argument-validation, range-query, data-structures
Can't remove ${value}. Remove method is not implemented yet
exception error red-black-tree, not-implemented, remove, data-structures, balanced-tree