测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 528 字符 |
模型生成的代码 (528 字符)
def right_insertion(sorted_list, value):
"""
Locate the right insertion point for a value in a sorted list.
Returns the index where value should be inserted to maintain
sorted order, placing the new element after any existing entries equal to it.
This is equivalent to bisect.bisect_right.
"""
low, high = 0, len(sorted_list)
while low < high:
mid = (low + high) // 2
if sorted_list[mid] <= value:
low = mid + 1
else:
high = mid
return low
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试