public class SampleExam { public static void main (String[] argv) { // You are encouraged to add your testing code here. } static int problem1 (int[] A, int[] B) { // Identify the day of maximum profit when A[i] = revenue // on day i, and B[i] = cost on day i. // Temporarily: return -1; } static int[] problem2 (int[] A) { // Identify the elements in an array that have larger // elements on either side of them. // Temporarily: return null; } static boolean problem3 (String s) { // Check whether a word has two chars in sequence like "de" in "den" // Temporarily: return false; } static char[] problem4 (char[] letters, int m, int n) { // Extract part of the array letters from index m to index n, // including the letters at positions m and n. // Temporarily: return null; } static int problem5 (int n) { // The smallest k such that 1+3+5...+k crosses or reaches n // Temporarily: return -1; } static boolean problem6 (double[] A) { // Is A an array such that all positive values in A // are preceded by all the negative values in A? // Temporarily: return false; } static boolean problem7 (char[] A, char[] B) { // Is Array A contained as a sub-array of B? That is, the // chars in A occur in sequence as a subsequence in B? // Temporarily: return false; } static int[] problem8 (int[] A, int[] B) { // Create and return a new array that has all the elements in A // along with those elements in B that do not occur in A. // Your code must use arrays and only arrays. // Temporarily: return null; } static char[] problem9 (char[] A) { // Return a new array with all the chars in A such // that vowels are first and that, amongst the vowels, // the vowels occur in the same order as in A, and amongst // the consonants, they occur in the same order as in A. // Your code must use arrays and only arrays. // Temporarily: return null; } static int[] problem10 (int[] A) { // The array A has both positive and negative numbers. // Return a new array A with only the positive numbers. // Your code must use arrays and only arrays. // Temporarily: return null; } }