============================================================================= Instructions: IMPORTANT: You must use a plain editor like "notepad" to work on this assignment (Do NOT use fancy text editors like Windows Word) We do not accept Rich Text format; only plain text files as answer Write the derivation of the runtime complexity (in exactly formula) for the loops/recursive function. Use indentation (with spaces) to line up the test if necessary to make your equations "pretty" ============================================================================= Answer to question 1: ========================== What is the runtime complexity (in exact formula) for the following program fragment (i.e.: how many times is doPrimitive() executed expressed in term of N): for (i = 0; i < N; i = i + 2) for (j = i; j < N; j++) doPrimitive(); Answer to question 2: ========================== What is the runtime complexity (in exact formula) for the following recursive function where b-a is the input size (i.e.: how many times is doPrimitive() executed expressed in term of N = b-a): public static void recurse(int[] A, int a, int b) { if ( b - a <= 1 ) return; // 0 times for (int i = a; i < b; i++) doPrimitive(); // b-a = N times recurse(A, a, (a+b)/2); recurse(A, (a+b)/2, b); }