Question: please solve this ascending order and target is the search key: : target 9 What is the role of the function fn1
" ascending order and "target" is the search key: : " "target" 9 " What is the role of the function fn1 and what is its complexity time according to big 0 notation? 1. Fn1 is a binary search function with complexity =O(n) 2. Fn1 is a binary search function with complexity =O(log(n)) 3. Fn1 is a linear search function with complexity =O(n) 4. Fn1 is a linear search function with complexity =O(nlog(n)) 5- Given the following Algorithm where Arr is an array of size n : n Arr A Procedure p1(Arr, n) For (i=0; iO notation? 1. 11in 2. O(12) 3. O(1) 4. O(n) 5. None of the above 6. Given the execution of the function getPermutations, what is its complexity time using big 0 notaion? getpermutations('a') /1[ " "a'] getpernutations ('ab') // [ 'ab', 'ba'] getPereutations('abc') /1[ 'abc', 'acb', 'boc', 'bca', 'cab', 'cba'] 1. O(n) 2. O(nn2) 3. O(2)) 4. O(ni)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
