1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mylen [45]
3 years ago
13

Suppose that we time three functions in Python: linear searching, binary searching, and sorting. We determine their running time

s, based on the length of their list argument as:Tls(N) ~ 6.00x10-9 N, Tbs(N) ~ 1.80 x10-8Log2(N), and Ts(N) ~ 8.00 x10-7 N Log2 N. Suppose that we have a list of size N and we will search it Times (compute the time using these T functions). We can do a linear search each time or we can first sort the data (just once) and then do a binary search each time. How long does it take…(compute logs and show your answer to 3 significant digits, like the coefficients above) a1) to do a linear search of 100 values 100 times
Computers and Technology
1 answer:
Igoryamba3 years ago
6 0

Answer:

134

Explanation:

because 6.00×10-9 =51 and 1.80×10-8=10 and 8.00×10-7=73 by adding them it will give the answer out by the figuer 134

You might be interested in
Kayla is working on a document for her business meeting. She wants to save this document with another name. Which option should
Fittoniya [83]
Kayla could use “save as” to rename the document.
5 0
3 years ago
Create a class called Minimum that provides a single class method min. min should take an array of any object that implements Co
kaheart [24]

Answer:

The required code is given below:

Explanation:

public class Minimum {

   public static Comparable min(Comparable[] values) {

       if (values == null || values.length == 0) {

           return null;

       } else {

           Comparable minValue = values[0];

           for (int i = 0; i < values.length; i++) {

               if (values[i].compareTo(minValue) < 0) {

                   minValue = values[i];

               }

           }

           return minValue;

       }

   }

}

7 0
4 years ago
Consider the following recursive method. public static string recur(int val) { string dig = "" + (val % 3); if (val / 3 &gt; 0)
Oksana_A [137]

The recursive method recur executes itself from within

When the statement System.out.println(recur(32)); is executed, the string value "2101" is printed

<h3>How to determine the output of the statement?</h3>

The flow of the program is as follows:

  • The method keeps updating the string variable dig with the remainder of the val variable divided by 3
  • When the remainder is less than or equal to 0, the method is exited

So, when 32 is divided by 3.

The remainders are 2, 1, 0 and 1

So, the output of the statement is "2101"

Read about java methods at:

brainly.com/question/19271625

5 0
2 years ago
R7.1 Carry out the following tasks with an array:
Andru [333]

Answer:

Following are the program in the C++ Programming Language.

//set header file or namespace

#include <iostream>

using namespace std;

//define main function

int main() {

//set integer type array with indexing 10

 int a[10];

//set integer type variable to 1

 int i=1;

//set element in 1st index

 a[0]=17;

//set element in last index

 a[9]=29;

//set while loop for the remaining elements

 while(i<9)

 {

//set -1 in the remaining elements

   a[i]=-1;

   i++;

 }

//set for loop to print array

 for ( int j = 0; j < 10; j++ ) {

   cout << a[j]<<endl;

 }

}

<u>Output:</u>

17

-1

-1

-1

-1

-1

-1

-1

-1

29

Explanation:

In the following program, we define the main function "main()" and inside it.

  • Set an integer type array element "a[]" with index value 10.
  • Set integer data type variable "i" initialize to 1.
  • Set elements in the first and last place in the array.
  • Set the while loop to initialize elements for the remaining place.
  • Set the for loop to print the array elements.
6 0
3 years ago
In object-oriented programming, what is a constructor?
hjlf

A constructor in object-oriented programming is a special method of a class or structure that initializes an object of that type. Basically, it resembles an instance method that usually has the same name as the class. In simple terms, it is a subroutine called to create an object.






3 0
4 years ago
Other questions:
  • They predicted another cold day in Seattle. They predicted another windy day in Seattle. Combine the sentences into one sentence
    8·1 answer
  • . What is the difference between subnetting and supernetting?
    13·1 answer
  • Which data type structures best for insersion/ removal - Stack, linked list, queue?
    15·1 answer
  • Select the true statement from the choices below. Group of answer choices Invalid code may cause browsers to render the pages sl
    11·1 answer
  • A global project called One Laptop per Child is attempting to distribute low-cost laptop computers to children in developing cou
    10·1 answer
  • Assume the existence of an UNSORTED ARRAY of n characters. You are to trace the CS111Sort algorithm (as described here) to reord
    14·1 answer
  • What is the promotion and advertising stage of a product or service called?
    15·1 answer
  • Consider the conditions and intentions behind the creation of the internet—that it was initially created as a tool for academics
    12·1 answer
  • Can we update App Store in any apple device. (because my device is kinda old and if want to download the recent apps it aint sho
    10·1 answer
  • In a conditional statement, the______ symbol is used to separate a test expression from the expression to be processed if the te
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!