归并排序(python) 摘要:解题思路:注意事项:参考代码:def merge_sort(nums): if len(nums) <= 1: return nums # 分割阶段 mid = len…… 题解列表 2023年12月18日 0 点赞 0 评论 262 浏览 评分:0.0
堆排序(python) 摘要:解题思路:注意事项:参考代码:def heapify(nums, n, i): if len(nums) <= 1: return nums largest = i # 初…… 题解列表 2023年12月18日 0 点赞 0 评论 187 浏览 评分:0.0
快速排序(python) 摘要:解题思路:注意事项:参考代码:def quick_sort(nums): if len(nums) <= 1: return nums pivot = nums[le…… 题解列表 2023年12月18日 0 点赞 0 评论 227 浏览 评分:0.0
第K极值(python) 摘要:解题思路:注意事项:参考代码:def is_prime(num): if num <= 1: return False for i in range(2, int(num *…… 题解列表 2023年12月18日 0 点赞 0 评论 248 浏览 评分:0.0
数列排序(python) 摘要:解题思路:注意事项:参考代码:n=int(input())for _ in range(n): nums=list(map(int,input().split())) left=[] …… 题解列表 2023年12月18日 0 点赞 0 评论 188 浏览 评分:0.0
绝对值排序(python) 摘要:解题思路:注意事项:参考代码:while True: nums = list(map(int, input().split())) n = nums[0] if n == 0: …… 题解列表 2023年12月18日 0 点赞 0 评论 191 浏览 评分:0.0
辗转相。。。。 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int gcd(int a,int b){ if(a%b==0) { return b; }else{ …… 题解列表 2023年12月18日 0 点赞 0 评论 184 浏览 评分:9.9
.................. 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[3][3]; for(int i=0;i<3;i++) { for(…… 题解列表 2023年12月18日 0 点赞 0 评论 169 浏览 评分:0.0
最最最简单简单 2833: 金币,不用while,注释写好了 摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; int main() { int n, total=0; // n 天数…… 题解列表 2023年12月18日 0 点赞 0 评论 172 浏览 评分:0.0
JAVA 糖果游戏升级版 摘要:解题思路:如果换成动态的n,不指定5 可能 6 7 8 9用数组来存储数据,先判断加减后是否超过左边界或者右边界如果超出进行数组下标调整注意事项:参考代码:import java.util.Sca…… 题解列表 2023年12月17日 0 点赞 0 评论 216 浏览 评分:4.7