JAVA

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

JAVA

Post by answerhappygod »

JAVA
Java 1
Java 1 (28.92 KiB) Viewed 29 times
<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;
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply