King saud help with district math
Need help with this assignment?Get an original answer from a qualified tutor — from $10/page.
Get it written →Submit Homework 4 | Gradescope 3/11/24, 3:28 PM 0/6 Questions Answered https://www.gradescope.com/courses/708781/assignments/4190201/submissions/new Page 1 of 4 Submit Homework 4 | Gradescope 3/11/24, 3:28 PM Homework 4 Q1 1 Point Describe an algorithm that takes as input a list of n integers and finds the location of the last even integer in the list or returns 0 if there are no even integers in the list. Please select file(s) Select file(s) Save Answer Q2 1 Point Describe an algorithm that takes as input a list of n distinct integers and finds the location of the largest even integer in the list or returns 0 if there are no even integers in the list. Please select file(s) Select file(s) Save Answer https://www.gradescope.com/courses/708781/assignments/4190201/submissions/new Page 2 of 4 Submit Homework 4 | Gradescope 3/11/24, 3:28 PM Q3 2 Points Let k be a positive integer. Use the definition of Big-O to show that 1k + 2k + ⋯ + nk is O (nk+1 ) . Please select file(s) Select file(s) Save Answer Q4 2 Points Give a big-O estimate for each of these functions. For the function g in your estimate f (x) is O(g(x)), use a simple function g of the smallest order. (You don’t have to prove it by using definition i.e. you don’t need to find C or k .) a) (n3 + n2 log n) (log n + 1) + (17 log n + 19) (n3 + 2) b) (2n + n2 ) (n3 + 3n ) c) (nn + n2n + 5n ) (n! + 5n ) Please select file(s) Select file(s) Save Answer https://www.gradescope.com/courses/708781/assignments/4190201/submissions/new Page 3 of 4 Submit Homework 4 | Gradescope 3/11/24, 3:28 PM Q5 2 Points Show that for all real numbers a and b with a > 1 and b > 1, if f (x) is O (logb x), then f (x) is O (loga x). Please select file(s) Select file(s) Save Answer Q6 2 Points 3 Find the smallest value of n so that (4×2 + 3x + 1) is O (xn ) . Explain how you found n in a sentence or two. (You don’t have to prove it by using definition i.e. you don’t need to find C or k .) Save Answer Save All Answers https://www.gradescope.com/courses/708781/assignments/4190201/submissions/new Submit & View Submission Page 4 of 4
Get a plagiarism-free answer to this question
Send us your instructions and we’ll match you with the best writer in your subject.
- 100% human-written, zero AI
- Turnitin report included
- Confidential — we never share your data
- Free revisions & refunds