测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | FAIL |
| Plus 测试 | PASS |
| 代码长度 | 337 字符 |
模型生成的代码 (337 字符)
def heap_sort(lst):
"""Sorts the given list in-place using the heap sort algorithm and returns it."""
n = len(lst)
if n <= 1:
return lst
# Build a max heap
for i in range(n // 2 - 1, -1, -1):
_heapify(lst, n, i)
# Extract elements one by one
for i in range(n - 1, 0, -1):
lst[0], lst
Base 失败测试用例
[[1, 3, 5, 7, 9, 2, 4, 6, 8, 0]]
Plus 失败测试用例
- 无失败测试