JAVA
<Efficiency> The following questions are related to the Big Oh Notation. a) What is the Big Oh notation in the following code? for(j=0; j<n; j++) { for (k=1; k<=N; k++) x = x + 1; b) What is the Big Oh notation in the following code? for(j=N; j>0;j=j/2) { for (k=0; k<N; k++) { x = x + 1; c) What is the Big Oh notation in the following code? for(j=0; j<N; j++) { for (k=0; k<N; k++) { for (z=0; z<N; z++) { x = x + 1;
JAVA
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am