1 package iYou.neugle.search; 2 3 public class Sequence_search { 4 public static int SequenceSearch(double[] array, double key) { 5 for (int i = 0; i < array.length; i++) { 6 if (key == array[i]) { 7 return i; 8 } 9 } 10 return -1; 11 } 12 }
时间: 2024-11-08 10:03:23