Изменения
→Псевдокод
*/
left = array.begin(); right = array.end();
'''for''' i = 1 '''to''' n {
left = '''lower_bound'''(left, right, p[i], cmp<tex>_i</tex>); right = '''upper_bound'''(left, right, p[i], cmp<tex>_i</tex>);
}
'''if''' (right - left > 0) {
yield left ; yield right ;
} '''else'''
yield "No matches";
== Более быстрый поиск ==