网站首页 站内搜索

搜索结果

查询Tags标签: Sorting,共有 13条记录
  • ABC261

    Intersection Tournament Result NewFolder(1) Flipping and Bonus Many Operations Sorting Color Balls Replace Game on Graph

    2022/9/4 23:25:23 人评论 次浏览
  • unity2D rubywar练习记录

    人物被背景遮挡:更改sorting layer,值越大越靠前https://blog.csdn.net/ithot/article/details/90679992

    2022/4/12 1:12:35 人评论 次浏览
  • CF1637A Sorting Parts 题解

    题目传送门 题意简述 给你一个长度为 \(n\) 的数组 \(a\),你可以选择 \(1\sim n-1\) 的一个数 \(len\),分别对 \([1,len]\) 和 \([len+1,n]\) 排序,如果存在一个 \(len\) 能使数组非升序输出 YES,否则输出 NO。 分析 这题我的考场代码被 hack 了,暴力枚举会 TLE。 我…

    2022/2/15 23:15:12 人评论 次浏览
  • 1859. Sorting the Sentence

    This problem can be solved by bicket sorting. Although the problem only requires the number is 1~9, but my solution can be extended to any number sentences:class Solution {public String sortSentence(String s) {String[] strs = s.split(" ");St…

    2022/2/15 6:11:37 人评论 次浏览
  • 2089. Find Target Indices After Sorting Array

    这道题的最简单算法,时间复杂度O(nlogn):public List<Integer> targetIndices(int[] nums, int target) {Arrays.sort(nums);List<Integer> res = new ArrayList<>();for(int i=0;i<nums.length;i++){if(nums[i]==target)res.add(i);}return res;}把…

    2022/1/19 6:03:28 人评论 次浏览
  • 2089. Find Target Indices After Sorting Array

    这道题的最简单算法,时间复杂度O(nlogn):public List<Integer> targetIndices(int[] nums, int target) {Arrays.sort(nums);List<Integer> res = new ArrayList<>();for(int i=0;i<nums.length;i++){if(nums[i]==target)res.add(i);}return res;}把…

    2022/1/19 6:03:28 人评论 次浏览
  • CF 1591D - Yet Another Sorting Problem

    题目链接: https://codeforces.com/problemset/problem/1591/D 题目大意: 给定一个长度为 \(n\) 的序列,可以选择其中的一个三元组 \((i, j, k)\),按顺序移动 \(i -> j -> k -> i\),可以进行任意次该操作,判断是否能使该序列变成非递减序列。 思路: 从序列…

    2022/1/13 23:03:50 人评论 次浏览
  • CF 1591D - Yet Another Sorting Problem

    题目链接: https://codeforces.com/problemset/problem/1591/D 题目大意: 给定一个长度为 \(n\) 的序列,可以选择其中的一个三元组 \((i, j, k)\),按顺序移动 \(i -> j -> k -> i\),可以进行任意次该操作,判断是否能使该序列变成非递减序列。 思路: 从序列…

    2022/1/13 23:03:50 人评论 次浏览
  • 1052 Linked List Sorting (25 分)

    A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key and a Next pointer to the next structure. Now given a linked list, you are supposed to sort the struc…

    2021/7/13 23:38:46 人评论 次浏览
  • 1052 Linked List Sorting (25 分)

    A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key and a Next pointer to the next structure. Now given a linked list, you are supposed to sort the struc…

    2021/7/13 23:38:46 人评论 次浏览
  • 基础算法之插入排序(insetion sorting)

    1,算法名称:升序插入排序(insertion sorting) 2,时间复杂度:O(n^2) 3,实现方式:C语言 4,空间复杂度:O(1) 5,稳定性:稳定 6,算法思想:插入排序原理很简单,将一组数据分成两组,我分别将其称为有序组与待插入组。每次从待插入组中取出一个元素,与有序组的元…

    2021/5/12 22:27:10 人评论 次浏览
  • 基础算法之快速排序(quick sorting)

    注:快速排序是冒泡排序的一种改进,采取了分治的策略(点击查看详情)。 1,算法名称:升序快速排序(ascending quick soring) 2,时间复杂度:O(nlog2n) 3,实现方式:C语言 4,空间复杂度:O(log2n) 5,稳定性:否 6,有无改进:有 7,算法思想:通过一趟排序将要排序…

    2021/5/12 22:27:09 人评论 次浏览
  • Sorting Array Values in PHP(数组排序)

    有时候,你可能需要对数组内的值进行排序,那么就可以参考下面的文章。

    2019/6/30 15:22:24 人评论 次浏览
扫一扫关注最新编程教程