冒泡法排序(c语言) 摘要: #include <stdio.h> int main() { int n, a[123], i, j, t; while (scanf("%d", &n) !=…… 题解列表 2023年08月28日 0 点赞 0 评论 237 浏览 评分:0.0
1738: 排序题解 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<algorithm> using namespace std; int main() { int…… 题解列表 2024年10月09日 0 点赞 0 评论 510 浏览 评分:0.0
1738: 排序 -选择排序 摘要:注意事项:注意输入输出格式参考代码:def selection_sort(nums): length = len(nums) for i in range(length): …… 题解列表 2024年10月27日 0 点赞 0 评论 386 浏览 评分:0.0
1738: 排序 -插入排序 摘要:注意事项: 注意输入输出参考代码:# 插入排序_升序 def insertion_sort(nums): # 遍历数组 for i in range(1, len(nums)):…… 题解列表 2024年10月27日 0 点赞 0 评论 467 浏览 评分:0.0
1738: 排序 -希尔排序 摘要:**注意输入输出** ```python # 希尔排序 def shell_sort(nums): # 间隙初始为数组长度的一半 gap = len(nums) // 2 …… 题解列表 2024年10月28日 0 点赞 0 评论 512 浏览 评分:0.0
快速排序解决 摘要:解题思路:多组测试数据可以利用输入的返回值体现,当有输入n的操作的时候才进行对下一行n个数据进行排序注意事项:快排别写错,注意换行参考代码:#include<iostream>#inclu…… 题解列表 2025年02月04日 0 点赞 0 评论 449 浏览 评分:0.0
1738: 排序 (sort) 摘要:解题思路:使用sort()排序,注意使用头文件<bits/stdc++.h>或使用#include<algorithm>头文件sort(begin, end, cmp),其中b…… 题解列表 2025年03月01日 2 点赞 0 评论 681 浏览 评分:0.0
这个代码简单些 摘要:解题思路:注意事项:可以输入输出多组数据,列题有误导,所以要加上跳出条件参考代码:while True: try: n=…… 题解列表 2025年03月11日 0 点赞 0 评论 654 浏览 评分:0.0
三种方法:sort()+multiset容器+递归函数 摘要:解题思路:注意事项:注意题目说可能有多组测试数据,所以要使用循环输入,我就是刚开始没注意,根本不知道自己代码哪里出问题了-_-参考代码://sort()#include<iostream>…… 题解列表 2025年04月17日 0 点赞 0 评论 287 浏览 评分:0.0
1738: 排序 冒泡排序 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>#include<cmath>using namespace s…… 题解列表 2025年08月18日 0 点赞 0 评论 210 浏览 评分:0.0