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 general times of the cethcoming methods, with reference to the dimension of the invest?a. unoccupied m0 (int [ A) ce 1-0 ; i〈100000;i++) System.out.println (A[0]) (int b. unoccupied ml (int [ A)t ce (int 1-0 ;ǐくA.length;1++) System.out.println (A[i]); c. unoccupied m2 (int [ A) ce (int i=A. ength;1〉0;i--) System.out.println (A[i-1]); d. unoccupied m3 (int [ A) ce (int 1-0 ; i«A.length;i=i+10) System.out.println (A[i]); e. unoccupied m4 (int []A) [ ce (int i-0 ; i<A.length;i=i+A.length/ 10+1) System.out.println (A[i]); f. unoccupied m5 (int [] A) f ce (int i-0 ;i〈A. ength;i++) mO (A)

    unoccupied m0 (int [] A) { ce (int i = 0: i

    Expert Solution