[moz] feat: 三种排序算法实现最大值查找 #117
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
任务
实现三种排序算法,从一堆数字中找到最大值。
算法要求
输入
一个数字列表(int 或 float),例如
[3, 1, 4, 1, 5, 9, 2, 6]输出
列表中的最大值,例如
9验收标准
def find_max_bubble(nums: list[int | float]) -> int | floatdef find_max_quickselect(nums: list[int | float]) -> int | floatdef find_max_linear(nums: list[int | float]) -> int | floatNonesrc/algorithms/目录