题解 1738: 排序

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

1738: 排序 -希尔排序

摘要:**注意输入输出** ```python # 希尔排序 def shell_sort(nums): # 间隙初始为数组长度的一半 gap = len(nums) // 2 ……

1738: 排序 -插入排序

摘要:注意事项: 注意输入输出参考代码:# 插入排序_升序 def insertion_sort(nums):     # 遍历数组     for i in range(1, len(nums)):……

1738: 排序 -选择排序

摘要:注意事项:注意输入输出格式参考代码:def selection_sort(nums):     length = len(nums)     for i in range(length):   ……

1738: 排序题解

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<algorithm> using namespace std; int main() {     int……

使用冒泡排序法

摘要:解题思路:使用冒泡排序法 注意事项:参考代码:#include<stdio.h>   //冒泡排序法函数//函数可以copy一下回头还可以用 void bubbleSort(int arr[],……

编写题解 1738: 排序

摘要:```c #include int main() { int num,nums[100],i,j,temp; while(~scanf("%d",&num)){ for……

1738-排序(由小到大*多数据排序)

摘要:解题思路:用数组储存数据,两个for循环遍历数据,比较大小交换位置注意事项:会用到new获取数组大小参考代码:#include <iostream>using namespace std;void s……

无聊的星期六

摘要:try:     while input()!=&#39;&#39;:         z=input()         z=list(map(int,z.split()))        ……