Please solve all these correctly as fast as possible.

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

Please solve all these correctly as fast as possible.

Post by answerhappygod »

Please solve all these correctly as fast as possible.
Please Solve All These Correctly As Fast As Possible 1
Please Solve All These Correctly As Fast As Possible 1 (59.66 KiB) Viewed 44 times
Time Complexity 1. In your quiz you had a pseudo code like this which basically calculates the number of handshakes occurring among 'n' people if all of them shake hands with each other. The pseudo code was something like this one : (n << input) handshakes = 0 for (k = n; k >= 1; k = k-1){ for (i = k-1; i >= 1; i = -1){ handshakes = handshakes + 1 } print(f"Total number of handshakes are {handshakes}") a) Can you suggest another algorithm/pseudo code that performs this task more efficiently? Mention the running time of your algorithm. -5 b) Can you suggest another solution which is even better than the first algorithm? Mention the running time of this one too. -2 2. Sort the functions T(n) from slowest to fastest from the perspective of running time. n, n², n!, nlog(n), 7", eIn(n) 3. Show that 2nº + 5n² + 6n + 18 is in e(nº). - 3 -3
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply