02 2019 档案
折半查找
摘要:一:折半查找: public int rank(int key, int[] arr){ // 要求数组是有序的 int min = 0; int max = arr.Length - 1; while(min <= max){ // 被查找的内容要么不在要么在arr[min ,,,, max]之中 阅读全文
posted @ 2019-02-27 19:52 百晓灵狐 阅读(165) 评论(0) 推荐(0)
快速排序<C#>
摘要:using System; namespace Algorithm.AFind { public class Example04:IComMethod { int[] a1 = { 8, 9, 7, 5, 4, 3, 10, 12, 1, 2, 21, 66, 43}; public Example 阅读全文
posted @ 2019-02-27 19:52 百晓灵狐 阅读(202) 评论(0) 推荐(0)
选择排序<C#>
摘要:目标:对数组(列表等任意有序容器)进行排序 方法:对列表进行遍历,选出最大的 之后将这个数储存起来,对剩下的数再选择最大的,之后再对剩下数做同样的操作 直至结束即可。 代码如下: public class Example02:IComMethod { public Example02() { } p 阅读全文
posted @ 2019-02-27 15:51 百晓灵狐 阅读(122) 评论(0) 推荐(0)
Unity3D Button组管理(给按钮的onclick事件“传递参数”)
摘要:using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.UI; // 利用委托来进行按钮组的管理public class test07 : MonoBehaviour 阅读全文
posted @ 2019-02-26 15:02 百晓灵狐 阅读(6462) 评论(0) 推荐(0)