Feature #644
Von Maximilian Seesslen vor etwa 7 Stunden aktualisiert
Iterating over all entries takes much time. Binary search would be quite fast.
<pre>
S=7
[1] [2] [3] [4] [5] [6] [7] [8] [9]
L R
C=(L+R)/2
if(*C < S )
L=C;
else if (*C > S )
R=C;
else
found;
C=5; L=5; R=9;
C=7; found;
</pre>
<pre>
S=7
[1] [2] [3] [4] [5] [6] [7] [8] [9]
L R
C=(L+R)/2
if(*C < S )
L=C;
else if (*C > S )
R=C;
else
found;
C=5; L=5; R=9;
C=7; found;
</pre>