
算法总结
IT土匪
积极阳光有责任心
展开
-
排序算法汇总(C#版)
选择排序void SeletSort(){ int[] arr = {90,80,10,40,20,50,30}; printList(arr); for (int i = 0; i < arr.Length; i++) for (int j = arr.Length - 1; j &g...原创 2018-12-07 13:49:15 · 179 阅读 · 0 评论 -
【算法】从有序列表里面随机获取出一个指定个数且不重复的数组
从1-5种随机出一个大小为3的数组GetNoRepeatRandom(1,5,3);public int[] GetNoRepeatRandom(int start, int end, int n) { if (n <= 0 || start > end) { return null; } int len =...原创 2018-12-29 17:33:18 · 796 阅读 · 0 评论 -
【LeetCode算法】初级数组 练习汇总
using System;using System.Collections;using System.Collections.Generic;using System.Text;using UnityEngine;public class Test : MonoBehaviour { void Start() { //GetNoRepeatRandom(1,...原创 2019-01-03 21:45:25 · 241 阅读 · 0 评论