Answer:
The answer is "binary search= 5.111 and Linear seacrch= 6400".
Explanation:
Following are the description of this question:
- Binary Search-The performance with single arrays is log 10000 = 4, through the use of two arrays (60/100)*log4000 + (40/100)*(log4000 + log6000) = 5.111.
- In the linear search: while doing static searches, 10000 would be performed, and (60/100)*4000 + (40/100)*6000 = 6400 will be used with two arrays.
- It's a special case, that will be used in one of the arrays in a binary search. Whereas good case uses linear frames, two frames are used, as indicated above.
Answer:
c. Enables a security administrator to control user and resource access from individual machines rather than from a central location.
Explanation:
Effective resource management requires that network resources or databases be accessed securely or protected from unauthorized users. A company with an effective resource management policy like Amazon cloud services and Google cloud services allows for an administrator to Grant access to a group of users with configured individual devices.
int firstNumber,secondNumber = -1, duplicates = 0;
do {
cin >> firstNumber;
if ( secondNumber == -1) {
secondNumber = firstNumber;
}else {
if ( secondNumber == firstNumber )
duplicates++;
else
secondNumber = firstNumber;
}
} while(firstNumber > 0 );
cout << duplicates;
Answer:
The solution code is written in Python
- def largerThanN(myList, n):
- output = ""
-
- for x in myList:
- if(x > n):
- output += str(x) + " "
-
- print(output)
-
- l = [5, 12, 11, 4, 56, 32]
- n = 15
- largerThanN(l, n)
Explanation:
Firstly, create a function largerThanN that accepts two arguments, a list (myList) and a number (n) (Line 1).
Next, create a output variable to hold the string of numbers in the list that are greater than the input number n (Line 2).
Create a for loop to traverse through each number in the list and then check if the current x is bigger than n. If so concatenate the x to output string along with a single space " " (Line 4 -6)
After the loop, print the output string (Line 8)
We test the function by using a sample list and n = 15 (Line 10 - 12). The program will display 56 32 .
Find the given attachments