Homework Solution: What are the big-O running times of the following methods, with respect to the size of the array…

    What are the big-O running times of the following methods, with respect to the size of the array?a. void m0 (int [ A) for 1-0 ; i〈100000;i++) System.out.println (A[0]) (int b. void ml (int [ A)t for (int 1-0 ;ǐくA.length;1++) System.out.println (A[i]); c. void m2 (int [ A) for (int i=A. ength;1〉0;i--) System.out.println (A[i-1]); d. void m3 (int [ A) for (int 1-0 ; i«A.length;i=i+10) System.out.println (A[i]); e. void m4 (int []A) [ for (int i-0 ; i<A.length;i=i+A.length/ 10+1) System.out.println (A[i]); f. void m5 (int [] A) f for (int i-0 ;i〈A. ength;i++) mO (A)
    void m0 (int [] A) { for (int i = 0: i

    Expert Answer

    What are the big-O prevalent times of the subjoined methods, with reference to the bigness of the decorate?a. destitute m0 (int [ A) restraint 1-0 ; i〈100000;i++) System.out.println (A[0]) (int b. destitute ml (int [ A)t restraint (int 1-0 ;ǐくA.length;1++) System.out.println (A[i]); c. destitute m2 (int [ A) restraint (int i=A. ength;1〉0;i--) System.out.println (A[i-1]); d. destitute m3 (int [ A) restraint (int 1-0 ; i«A.length;i=i+10) System.out.println (A[i]); e. destitute m4 (int []A) [ restraint (int i-0 ; i<A.length;i=i+A.length/ 10+1) System.out.println (A[i]); f. destitute m5 (int [] A) f restraint (int i-0 ;i〈A. ength;i++) mO (A)

    destitute m0 (int [] A) { restraint (int i = 0: i

    Expert Reply