Commit f188db1
deepshekhardas
fix(searches): handle empty list in exponential_search
Fixes IndexError when sorted_collection is empty by
returning -1 early before accessing index 0.1 parent c0db072 commit f188db1
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
| |||
0 commit comments