题解 1738: 排序

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

筛选

排序 (C语言代码)

摘要:解题思路:注意事项:参考代码:#include <cstdio> #include <iostream> #include <algorithm> using namespace std; c……

1738: 排序题解

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

1738: 排序 -选择排序

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

1738: 排序 -插入排序

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

1738: 排序 -希尔排序

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

排序 (C++代码)

摘要:解题思路:注意事项:参考代码:#include<cstdio>int arr[100];void swap(int &a,int& b){ int temp=a; a=b; b=temp;}void ……

  编写题解 1738: 排序

摘要:package test; //题目 1738: 排序 import java.util.Scanner; public class t_1738 { public static void ……

排序 (C++代码)(非STL的SORT)

摘要:解题思路:这是一种分治思维,现将所排序选择的数字定位,再将左右两边的数用递归的方式再度进行这样的排序,此排序的时间复杂度为O(NlogN)注意事项:参考代码:(请不要直接抄袭)#include<bit……

快速排序解决

摘要:解题思路:多组测试数据可以利用输入的返回值体现,当有输入n的操作的时候才进行对下一行n个数据进行排序注意事项:快排别写错,注意换行参考代码:#include<iostream>#inclu……