From 82cca1a6c31fd05dcef268010c8eaff80cbc6de3 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Mon, 28 Mar 2022 21:18:08 -0500 Subject: Add note about segment trees to README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f5aa1bf..5eb8a83 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,6 @@ If you're wondering where the name came from, I named this app after a common ty ## Performance -SD is designed to be extremely efficient in order to support a very large number of flash cards and should be able to handle several billion cards with ease. If `N` is the number of cards, initializing the program requires `O(N)` time and `O(N)` memory. Selecting a random card and adjusting its weight based on if the user got it correct requires `O(log N)` time. +SD is designed to be extremely efficient in order to support a very large number of flash cards and should be able to handle several billion cards with ease. If `N` is the number of cards, initializing the program requires `O(N)` time and `O(N)` memory. Selecting a random card and adjusting its weight based on if the user got it correct requires `O(log N)` time. Internally SD uses [segment trees](https://en.wikipedia.org/wiki/Segment_tree) to achieve this time complexity. -A C port is planned but will probably never happen. +A C port for maximal speed and minimal executable size is planned but will probably never happen. -- cgit v1.2.3-70-g09d2