Question: input: int[] A, int[] B 1 for i = 0 to n-1: 2 if A[i] == 5 return true 3 endfor 4 for i =
input: int[] A, int[] B 1 for i = 0 to n-1: 2 if A[i] == 5 return true 3 endfor 4 for i = 0 to n-1: 5 if B[i] == 4 return true 6 endfor 7 return false;
What is the purpose?
input size?
smallest big-O notation?
/////////////////////////////////////////////////////////////
input: int[] A 1 for i = 0 to n-1: 2 for j = 0 to n-1: 3 if A[i] == A[j] return true 4 endfor 5 endfor 6 return false;
What is the purpose?
input size?
smallest big-O notation?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
