In this episode, we implement a binary search tree as an alternative to the sorted array from the last episode. We benchmark the performance of insertion and lookup in both data structures, with some surprising results.
Károly joins us to improve our sorted array implementation from episode #35 using binary search. We benchmark both implementations to learn about their real-world performance.
We show how to make an extension on array available to other collections: first, we implement it for array slices, then we implement it as a protocol extension for all collections.