Last item with a key less-than k.
(seq, k)
| 259 | return -1 |
| 260 | |
| 261 | def slow_find_lt(seq, k): |
| 262 | 'Last item with a key less-than k.' |
| 263 | for item in reversed(seq): |
| 264 | if item < k: |
| 265 | return item |
| 266 | return -1 |
| 267 | |
| 268 | def slow_find_ge(seq, k): |
| 269 | 'First item with a key-value greater-than or equal to k.' |