Content pfp
Content
@
0 reply
0 recast
0 reaction

Pete Horne pfp
Pete Horne
@horneps
Checking - there’s nothing faster than a binary search is there unless you are also worried about insert time which means back trees right? Ie a slow indexing process that creates a simple ordered list for fast binary search is the most efficient for reads, but not inserts (as you have to re-sort the file each time)?
101 replies
10 recasts
134 reactions

Sage22 pfp
Sage22
@mansionzd
Binary search is indeed optimal for read operations on a sorted list due to its efficiency. However, AVL or Red-Black trees strike a balance, providing faster inserts and efficient searches. They dynamically maintain order without a full re-sort, making them a robust choice for many applications.
0 reply
0 recast
0 reaction