Question-62 Give a big-O estimate for each of the following function. For the function g in the estimate f (x) is O (g(x)) , use a simple function g of…
Month: March 2014
Question-61
Question-61 Let k be a positive integer. Which of the following mathematical equations correctly shows that 1k + 2k + …………. + nk is O ? Solution
Question-60
Question-60 To establish a big-O relationship, find witnesses C and k such that whenever x > k. Find the least integer n such that f (x) is O for each…
Question-59
Question-59 To establish a big-O relationship, find witnesses C and k such that whenever x > k. Determine whether each of these functions is O a) f (x) = 11x +…
Question-58
Question-58 What of the following is an algorithm that locates the first occurrence of the largest element in a finite list of integers? The integers in the list are not…
Question-57
Question-57 Consider an algorithm that used only assignment statements that replaces the quadruple (w, x, y, z) with (x, y, z, w). What is the minimum number of assignment statements…
Question-56
Question-56 Which statement best describes an algorithm that takes as input a list of n integers and produces as output the smallest difference obtained by subtracting an integer in the…
Question-55
Question-55 Which of the following algorithms can be used to find the sum of all the integers in a list? Solution Procedure AddUp (a1,……….. , an : integers) sum…
Question-54
Question-54 Determine which characteristics of an algorithm described in the text (after Algorithm 1) the following procedures have and which they lack. Select characteristics that the procedures have and leave…
Question-53
Question -53 List all the steps used by Algorithm 1 to find the maximum of the list 5, 9, 13, 9, 11, 2, 16, 2, 14, 4 Solution max…
Recent Comments