Why is 6th one d??

6th one is d because the outer loop is running n times and inner nested loop is running m times so O(n*m)
Think of it like this inner loop is running m times for each i so m+m+m+…(n times) which is m*n or as written n*m

1 B

2 C

3 B

4 B

5 C

6 D

7 C

8 C

9 C

10 B

11 A

12 C

13 C

14 B

15 B

16 B

17 B

18 D

19 B

20 B

21 C

How to do Q 13 and Q 14 ?? Anyone Please help me to understand