accidental linear access times instead of constant

Methods for finding keys in the map would iterate over all keys
when the key did not exist.
Fixed by introducing a new sentinel value (-1) that is used to
mark slots that were previously occupied.
This commit is contained in:
2021-04-03 09:57:10 +02:00
parent f43cc2eda2
commit 9de619d815
7 changed files with 574 additions and 110 deletions

View File

@@ -20,8 +20,16 @@ plugins {
apply plugin: 'java'
apply plugin: 'eclipse'
ext {
javaVersion=11
version_junit = '5.7.1'
version_junit_platform = '1.7.1'
}
// java compatibility version
sourceCompatibility = 11
sourceCompatibility = javaVersion
/*
* The shared configuration for all sub-projects:
@@ -76,9 +84,10 @@ subprojects {
// dependencies that all sub-projects have
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
testRuntime 'org.junit.platform:junit-platform-launcher:1.7.0' // needed by eclipse
testImplementation "org.junit.jupiter:junit-jupiter-api:${version_junit}"
testImplementation "org.junit.jupiter:junit-jupiter-params:${version_junit}" // for @ParameterizedTest
testRuntime "org.junit.jupiter:junit-jupiter-engine:${version_junit}"
testRuntime "org.junit.platform:junit-platform-launcher:${version_junit_platform}" // needed by eclipse
}
test {