(String[] args)
| 52 | } |
| 53 | |
| 54 | public static void main(String[] args) { |
| 55 | Random rand = new Random(); |
| 56 | int n = rand.nextInt(300000) + 1; |
| 57 | int missing = rand.nextInt(n+1); |
| 58 | ArrayList<BitInteger> array = initialize(n, missing); |
| 59 | System.out.println("The array contains all numbers but one from 0 to " + n + ", except for " + missing); |
| 60 | |
| 61 | int result = findMissing(array); |
| 62 | if (result != missing) { |
| 63 | System.out.println("Error in the algorithm!\n" + "The missing number is " + missing + ", but the algorithm reported " + result); |
| 64 | } else { |
| 65 | System.out.println("The missing number is " + result); |
| 66 | } |
| 67 | } |
| 68 | } |
nothing calls this directly
no test coverage detected