Re: binary search

2016-01-18 Thread Alexander Burger
Hi Mike, > Today I was wonder is it possible to create a function for binary search > inside flatten or nested lists. > If I have ordered list I need something faster that O(n) and I should not > care of unique structure. > It was a goal while walking in the forest. You can do a binary search als

Re: binary search

2016-01-17 Thread Joh-Tob Schäg
Hi have you thought about implementing a skip list? It would be implemented very easily, it in particular excels with biased queries (certain parts more often than others) and other interesting properties, but has O(log(N)) access time, you could in theory even map some functions (which do not cha