First item with a key equal to k. -1 if not found
(seq, k)
| 245 | return -1 |
| 246 | |
| 247 | def slow_find(seq, k): |
| 248 | 'First item with a key equal to k. -1 if not found' |
| 249 | for item in seq: |
| 250 | if item == k: |
| 251 | return item |
| 252 | return -1 |
| 253 | |
| 254 | def slow_find_le(seq, k): |
| 255 | 'Last item with a key less-than or equal to k.' |