King saud help with district math
May 5, 2024
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
Trust your assignments to an essay writing service with the fastest delivery time and fully original content.