summaryrefslogtreecommitdiff
path: root/doc/mit-ocw
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-07-19 12:11:54 -0600
committermo khan <mo.khan@gmail.com>2020-07-19 12:11:54 -0600
commit47400bdee5ab137729db5a3fee7850ab1e140416 (patch)
treefaea68d2bce24705a779042fa8d9b008c062be13 /doc/mit-ocw
parentf4eae684605081de7c2c278312b2ed82eabad1f0 (diff)
Use a recursive stack to determine if a btree is a bst
Diffstat (limited to 'doc/mit-ocw')
-rw-r--r--doc/mit-ocw/bst.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/mit-ocw/bst.md b/doc/mit-ocw/bst.md
new file mode 100644
index 0000000..9c8cb4d
--- /dev/null
+++ b/doc/mit-ocw/bst.md
@@ -0,0 +1,9 @@
+# Scheduling & Binary Search Trees
+
+* Airport with a single runway.
+* Reservations for future landings.
+* Reserve request specifies landing time t
+* Add `t` to the set `R` of landing times if no other landings are scheduled within `k` minutes.
+* Remove from set `R` after plane lands.
+* `|R| = n`
+* `O(lg n)` time where `n` is the size of the set.