From 786a3bbeaa195f6d74b574a8ef255436a7e2e7a4 Mon Sep 17 00:00:00 2001 From: Inga Date: Tue, 14 Nov 2023 01:36:42 +0000 Subject: [PATCH] add clarification on what is stored and how --- hostnames_allocator/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/hostnames_allocator/README.md b/hostnames_allocator/README.md index d5aa561..5a557d0 100644 --- a/hostnames_allocator/README.md +++ b/hostnames_allocator/README.md @@ -57,6 +57,7 @@ See [src/ranged_number_allocator.rs](src/ranged_number_allocator.rs) for more de The asymptotic complexity above is theoretical; in practice, ideal trees don't actually work like that. In this implementation, Rust's [BTreeMap](https://doc.rust-lang.org/beta/std/collections/struct.BTreeMap.html) is used which is supposed to provide the same logarithmic asymptotic complexity in practice. +Range starts are used as keys and range ends as values. Memory requirements are `O(log(number of ranges))` plus combined length of all host types.