From f610e5e5572c23e7271c439b5f350ce341545095 Mon Sep 17 00:00:00 2001 From: norangebit Date: Thu, 11 Apr 2019 21:57:46 +0200 Subject: [PATCH] update ordered dictionaries if the dictionary is empty the functions min, max, floor and celling return None. --- .../algorithms/datastructures/dictionary/Dictionaries.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/it/norangeb/algorithms/datastructures/dictionary/Dictionaries.kt b/src/main/kotlin/it/norangeb/algorithms/datastructures/dictionary/Dictionaries.kt index bc2bd0f..e36e98a 100644 --- a/src/main/kotlin/it/norangeb/algorithms/datastructures/dictionary/Dictionaries.kt +++ b/src/main/kotlin/it/norangeb/algorithms/datastructures/dictionary/Dictionaries.kt @@ -37,8 +37,8 @@ interface Dictionary { } interface OrderedDictionary, V> : Dictionary { - fun max(): K - fun min(): K - fun floor(key: K): K - fun ceiling(key: K): K + fun max(): Option + fun min(): Option + fun floor(key: K): Option + fun ceiling(key: K): Option }