测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 376 字符 |
模型生成的代码 (376 字符)
def left_insertion(arr, x):
"""
Return the left insertion point for `x` in sorted `arr`.
If `x` is already present, the insertion point is before (to the left of) any existing entries.
"""
lo, hi = 0, len(arr)
while lo < hi:
mid = (lo + hi) // 2
if arr[mid] < x:
lo = mid + 1
else:
hi = mid
return lo
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试