From 6b1e587424463b3965c55c5949812c78c965dd58 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 23 Jun 2021 18:26:05 +0800 Subject: *misc --- Assets/Test/05_Recursion/Test_Recursion.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'Assets/Test') diff --git a/Assets/Test/05_Recursion/Test_Recursion.cs b/Assets/Test/05_Recursion/Test_Recursion.cs index aef587c..9399bc3 100644 --- a/Assets/Test/05_Recursion/Test_Recursion.cs +++ b/Assets/Test/05_Recursion/Test_Recursion.cs @@ -10,12 +10,13 @@ public class Test_Recursion : MonoBehaviour { void Start() { - TestPermutations(); + //TestPermutations(); //TestHanoi(); //TestBinarySearch(); //TestMergeSort(); //TestQuickSort(); //TestBubbleSort(); + TestSelect(); } void TestPermutations() @@ -138,4 +139,19 @@ public class Test_Recursion : MonoBehaviour Debug.Log(content); } + void TestSelect() + { + Debug.Log("查找"); + List value2 = new List() { 1, 2, 3, 6, 7, 8 }; //升序数组 + int v = -1; + if(SearchingHelper.Select(value2, 10, false, ref v)) + { + Debug.Log(v); + } + else + { + Debug.Log("未找到"); + } + } + } -- cgit v1.1-26-g67d0