13. Analyze the following method and use the Big O notation to show its complexity time (12 marks) (2 marks) public stat
Posted: Sat May 14, 2022 3:17 pm
13. Analyze the following method and use the Big O notation to show its complexity time (12 marks) (2 marks) public static int (int) if( N0) return 1: int x = 0; for (int i=0;i< N;i++) * +- fA(N-1); return x; b) 2 marks) public static int (int): int-0 for (int i=0;i< N;i++) return x; 1 marks) public static int B[int N) if ( NO) return 0 return fB/N/2) + f(n) - BN2); 1 DATA STRUCTURE AND ALGORITHM c) (2 marks) public static int fint N) if (N-1) return 0 return I + C(2) d) (2 marks) public static int 1(int N): if ( NO) return; return fD(N-1)+D(N-1): e) marks) public static int (E(int N) intx-0 for (int i=0;i< N;i++) for (int j = 0; j++) return x;