Question

10:41 B RT54% Read Only - You cant save changes to this f... Lab Assignment 4b Due: June 13h by 9:00 pm Note: Submit this wi

10:41 E T54% Read Only - You cant save changes to this f... Lab Assignment 4b Due: June 13h by 9:00 pm Note: Submit this wit

Find the big O algorithms
also write each way of how u got the algorithm in psuedocode
example // +1
//n-3

10:41 B RT54% Read Only - You can't save changes to this f... Lab Assignment 4b Due: June 13h by 9:00 pm Note: Submit this with Lab4.Zip (same file) . Asimple linear Search algorithm on an unsorted arrays Sta Cost 1 intlinearSearch int Jant n, int target) inti-0 whe(in targetaray returei itt 8 reum-1 2. The number of statements eecuted for caloulating the average value of a two-dinersional array with neelements Statementy Cont flaat find Aw 20 int float sum-0 a int n int whle in) inta while en) um a 10 itt 11 if ino) 11 14 return sum/n 14 else return DOfa 15 16 1 Lab Assignment 4b II
10:41 E T54% Read Only - You can't save changes to this f... Lab Assignment 4b Due: June 13h by 9:00 pm Note: Submit this with Lab4.Zip (same file) wite code for a meshod that uses a loop 1o compute the sum of all the integers feom 1 to N. Performs 3. analysis counting each basic operation (sach as assignment and increment) a ane operation Expe algarithm analysis in Be-Onotation. Solution Method Cost 4. tst the order of BigO terms from lawst to highest Salution 5. Lst the ig- term for the folowing sorts and srarches: al Seleion sort b) insertion sort Babble sor dQuick ar 다 Sequertial search n Binary search II
0 0
Add a comment Improve this question Transcribed image text
Answer #1

O(n^2)

O(nlogn)

O(n)

O(1)

The above contains the Big Oh analysis of the given code which can be found by running through the loops

Add a comment
Know the answer?
Add Answer to:
Find the big O algorithms also write each way of how u got the algorithm in...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT