Quantcast
Channel: iT邦幫忙
Viewing all articles
Browse latest Browse all 15645

java program work

$
0
0
不明白應該怎樣寫,請各位高手教下我,thx

int[] array = { 5, 9, 12, 34, 36, 46, 48, 50, 55, 65, 77, 89, 102 };
int index;
// perform binary search
index = binarySearch( array, 99);
System.out.println(index);

用上面資料寫到輸出會變成這樣
will be looked as:
50 55 65 77 89 102
77 89 102
102

-1

Viewing all articles
Browse latest Browse all 15645

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>