TheAlgorithms/Java
Documented errors, page 3 of 5. Back to TheAlgorithms/Java
| Code / Message | Type | Severity | Tags |
|---|---|---|---|
| number is negative | validation | error | validation, number-theory, precondition, recursion |
| Element not in queue | exception | error | heap, priority-queue, identity, change-key |
| Input array must not be null. | validation | error | java, null-check, two-pointers, precondition, illegal-argument |
| Invalid binary sequence for single-character tree. | exception | error | compression, huffman, single-character, validation, illegal-argument |
| Weights must be positive. | validation | error | knapsack, non-positive-weight, input-validation, java |
| Number must be greater than zero. | exception | error | math, number-theory, invalid-argument, non-positive |
| Padding '=' can only appear at the end (last 1 or 2… | exception | error | conversions, base64, rfc-4648, padding, validation, java |
| Stack cannot be null | exception | error | stack, null-argument, java, datastructures, precondition |
| Matrix cannot be null or empty | exception | error | matrix, null-check, precondition, sparsity, statistics |
| Max iterations must be positive. | validation | error | linear-algebra, input-validation, iterations, chebyshev-iteration, java |
| n must be positive. | validation | error | validation, number-theory, precondition, domain-error |
| Probability should be from 0 to 1. But was | exception | error | skip-list, invalid-argument, data-structure, config, java |
| Time step must be positive | exception | error | java, physics, parameter-validation, numerical-integration, rk4, time-step, illegal-argument |
| Frequencies must be non-negative | exception | error | huffman, precondition, validation, negative-value, compression |
| No instances. | exception | error | math, utility-class, instantiation, reflection |
| Queue is empty | exception | error | queue, data-structure, underflow, empty-state, two-stacks, java |
| Base must be greater than 1. | exception | error | math, validation, illegal-argument, number-theory |
| Implementation cannot sort negative numbers. | exception | error | sorting, non-negative-domain, input-validation |
| Key must contain each position exactly once | exception | error | cipher, permutation, duplicate, validation, illegal-argument |
| Input lists and result collection must not be null. | exception | error | merge, null-check, data-structure, precondition, java |
| The number of scores must be a power of 2. | validation | error | validation, minimax, game-tree, input-validation, power-of-two |
| Unexpected value | exception | error | cli, menu, switch-default, input-validation |
| Cannot remove element before calling next() | exception | error | dynamic-array, iterator, illegal-state |
| Eviction strategy must not be null | validation | error | java, fifo-cache, builder, null-check, eviction-strategy, argument-validation, cache |
| Heap is empty | exception | error | heap, empty-state, illegal-state, generic-heap |
| Number must be zero for PI assignment! | exception | error | math, builder, runtime-exception, state-validation |
| BeadSort cannot sort negative numbers. | exception | error | sorting, non-negative-domain, input-validation |
| Each edge must have exactly 2 nodes | exception | error | tree, invalid-argument, java, datastructures, centroid-decomposition, data-format |
| For input string | exception | error | conversions, base-conversion, radix, validation, java |
| Incorrect source | exception | error | graph, shortest-path, input-validation, argument-validation |
| Input cannot be null | validation | error | roman-numerals, input-validation, null-check |
| Input Stream already closed! | exception | error | io, stream, use-after-close, lifecycle, buffered-reader, illegal-state |
UNKNOWN_WORD Invalid Input. Unknown Word | exception | error | java, words-to-number, unknown-word, input-validation |
| Invalid node | exception | error | tree, invalid-argument, java, datastructures, indexing, centroid-decomposition |
| Cannot delete from an empty heap | exception | error | heap, max-heap, empty-state, checked-exception, delete |
| Incorrect input: Expecting an octal number (digits 0-7) | validation | error | number-conversion, input-validation, octal |
| Input string cannot be null or empty | validation | error | math, harshad, string-parsing, null-check, argument-validation |
| Key already exists; duplicates are not allowed. | exception | error | hashmap, cuckoo-hashing, duplicate, input-validation |
| Listener must not be null | validation | error | java, fifo-cache, builder, null-check, argument-validation, cache |
| baseNumbers must be non-empty. | exception | error | math, sequence, invalid-argument, empty-array |
| Cannot extract from empty heap | exception | error | heap, empty-state, data-structure, precondition, java |
| n must be a non-negative integer | exception | error | recursion, input-validation, illegal-argument, fibonacci, overflow-risk |
| timeValue must be a non-negative number. | validation | error | time-conversion, input-validation, range-check |
| A padding '=' must not be followed by a non-padding… | exception | error | conversions, base64, rfc-4648, padding, validation, java |
| Alphabet cannot be null or empty when text is not empty. | exception | error | compression, move-to-front, validation, illegal-argument |
| Exponent must be non-negative. | exception | error | math, exponentiation, invalid-argument, negative-exponent |
| n must be <= 25. For larger n, use BigInteger… | validation | error | combinatorics, overflow, bell-numbers, input-validation, bigint, java |
| n or k can't be negative | validation | error | validation, combinatorics, precondition |
| Input must be non-negative | exception | error | math, primes, sieve, input-validation |
| Value out of bounds for BCD representation | validation | error | bit-manipulation, bcd, encoding, range-validation, illegalargumentexception |
| Bit positions must be between 0 and 31 | validation | error | bit-manipulation, swap, argument-validation, range-validation, illegalargumentexception |
| Invalid hexadecimal character | validation | error | number-conversion, input-validation, hexadecimal |
| Matrix A cannot be empty. | validation | error | linear-algebra, input-validation, matrix, chebyshev-iteration, java |
| Queue is Empty | exception | error | priority-queue, data-structure, underflow, empty-state, heap, runtime-exception, java |
| Cannot delete from an empty tree | exception | error | splay-tree, empty-state, input-validation, java |
| Capacity must be > 0 | validation | error | java, fifo-cache, builder, capacity, argument-validation, cache |
| The input array cannot be null | exception | error | sorting, nullable, null-check, input-validation |
| Theta (angle) must be a finite number. | validation | error | coordinate-conversion, input-validation, floating-point, math |
| Weights and values must be non-null and of the same length. | validation | error | knapsack, array-mismatch, null-check, input-validation, java |
| Input must contain only '0' and '1'. Found | validation | error | bit-manipulation, java, validation, string, illegalargumentexception |
| DES key must be supplied as a 64 character binary string | validation | error | cryptography, ciphers, des, java, validation, illegalargumentexception |
| Maze must be a square (n x n) matrix. | validation | error | backtracking, matrix, shape-validation, argument-validation, illegalargumentexception |
| number must be nonnegative. | exception | error | math, reverse, invalid-argument, negative-value |
| Source vertex is out of bounds. | exception | error | graph, shortest-path, indexing, input-validation |
| The number of pairs of parentheses cannot be negative | validation | error | backtracking, string-generation, argument-validation, illegalargumentexception |
| Node index out of bounds | validation | error | validation, pagerank, indexing, input-validation, off-by-one |
| Duplicate key | exception | error | splay-tree, duplicate-key, input-validation, java |
| Index cannot be negative. | exception | error | dynamic-array, index-bounds, validation |
| Invalid numeric part | exception | error | date, zellers-congruence, parse-error, format-validation |
UNEXPECTED_WORD_AFTER_POINT Invalid Input. Unexpected Word (after Point) | exception | error | java, words-to-number, grammar, decimal |
| width and height must be > 0 | validation | error | validation, perlin-noise, procedural-generation, input-validation, array |
| Cannot insert null element | exception | error | heap, null-check, data-structure, precondition, java |
| Key length must match input length | exception | error | cryptography, ciphers, one-time-pad, java, validation, illegalargumentexception |
| Slope and intercept must be valid numbers. | exception | error | conversions, affine, nan, validation, java |
| Values and weights arrays must be non-null and of same… | validation | error | knapsack, array-mismatch, input-validation, java |
| Input parameter must not be negative! | exception | error | math, palindrome, invalid-argument, negative-value |
| Tree cannot be empty or null | exception | error | tree, null-argument, java, datastructures, centroid-decomposition, precondition |
| Cannot add null element to the list | exception | error | linked-list, null-check, data-structure, precondition, java |
INVALID_CONJUNCTION Invalid Input. Incorrect 'and' placement | validation | error | java, words-to-number, grammar, conjunction |
| Length must be positive | validation | error | java, physics, parameter-validation, pendulum, constructor, illegal-argument |
| bCoeffs must be of size | validation | error | audio, filter, argument-validation, illegalargumentexception, off-by-one |
| Cost matrix must be rectangular with equal row lengths | validation | error | graph-algorithm, argument-validation, matrix-shape, assignment-problem |
| Deque is empty | exception | error | deque, data-structure, underflow, empty-state, api-convention, java |
| Input array cannot be null | validation | error | arithmetic-subsequence, null-check, input-validation, java |
| Input must be non-negative. Received: | exception | error | math, sequence, invalid-argument, negative-index |
| Input number cannot be negative | validation | error | validation, number-theory, precondition |
| vertexCount must be non-negative | validation | error | graph-algorithm, argument-validation, value-constraint, bridge-finding |
| Edges list must not be null or empty | exception | error | graph, input-validation, null-check |
| multiplicativePersistence() does not accept negative values | exception | error | math, persistence, invalid-argument, negative-value |
| n must be non-negative. | exception | error | math, sequence, invalid-argument, negative-index |
| Number of nodes must be positive | exception | error | tree, invalid-argument, java, datastructures, centroid-decomposition, precondition |
| Prefix sum array cannot be null | exception | error | prefix-sum, input-validation, illegal-argument, null-check, static-utility |
| Invalid range: [ , ] for array of size | exception | error | prefix-sum, input-validation, illegal-argument, off-by-one, data-structure |
| Incorrect length parameters: minLength must be <= maxLength… | validation | error | validation, password, security, input-validation, range |
| Input array must have length of at least two | exception | error | math, array, input-validation, argument-validation |
| Input data contains invalid characters. | exception | error | cryptography, ciphers, java, validation, string, illegalargumentexception |
| k must be between 1 and the size of the array | validation | error | math, quickselect, array, argument-validation |
| Message must be non-negative. | validation | error | cryptography, ciphers, elgamal, java, validation, biginteger, illegalargumentexception |
| Variable number must be between 1 and | exception | error | sat, indexing, input-validation |
| Input arrays cannot be empty. | exception | error | math, validation, illegal-argument, interpolation, empty-array |