1: |
|
2: | You are considering writing a chess-playing program. How many dimensions would the array representing the chessboard need to have? |
3: |
|
4: |
|
5: | Suppose an array called numbers is declared as follows: int [] numbers = {2, 4, 6, 8, 10, 12, 6} ; Which values do the following method calls return?
|
6: | Suppose that your program is searching an array containing one million data items by using the binary search algorithm. How many data items does it discard (and need not to look at again) from the search during the first search loop? |
7: | Your program needs to search for a value in an array of length 2048. What is the maximum number of loops required to find the value by using a
|