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
lbvjy [14]
3 years ago
13

Does time complexity depend on, which base arithmetic you use? like base 10, 2 or whatever else? Does time coplexity depned on t

hose?
Computers and Technology
1 answer:
bazaltina [42]3 years ago
6 0

Answer:

No. Time complexity does not depend on which base arithmetic is used.

Explanation:

No. Time complexity does not depend on which base arithmetic is used.This is because log n to the base 10 and log n to the base 2 differ by the multiplicative factor log 10 to the base 2 which is a constant value independent of n. Similar is the case while transforming from one base to any other base. Moreover multiplication by a constant value does not change the overall time complexity. So time complexity is independent of base arithmetic.

You might be interested in
Rock, Paper, Scissors is a two-player game in which each player chooses one of three items. If both players choose the same item
mezya [45]

Answer:

The answer is c

Explanation:

7 0
3 years ago
Why must programs written in a high level language be translated into machine language before they can run?
earnstyle [38]
Because machine (cpu) can only execute machine code(language).
5 0
3 years ago
Write a program with a main method that asks the user to enter an array of 10 integers. Your main method then calls each of the
Kay [80]

Answer:

The remaining part of the question is given as follows:

printReverse - a void method that reverses the elements of the array and prints out all the elements in one line separated by commas (see sample output below).

getLargest - an int method that returns the largest value in the array.

computeTwice- a method that returns an array of int which contains 2 times of all the numbers in the array (see the sample output below).

Explanation:

// Scanner class is imported to allow the program receive

// user input

import java.util.Scanner;

// Arrays class is imported to allow the program display the array

// in a pretty way

import java.util.Arrays;

//The class definition

public class Solution {

   // main method is defined which signify beginning of program

  // execution

   public static void main(String[ ] args) {

       // an array is initialized with a size of 10

       int[] array =new int[10];

       // Scanner object scan is defined

       Scanner scan =new Scanner(System.in);

       // A loop is initiated to receive 10 user input to fill the array

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

           System.out.print("Please enter number: ");

           array[i]=scan.nextInt();

       }

       

       // A blank line is print

       System.out.println();

       // printReverse method is called with the received array as

      // argument

       printReverse(array);

       // A blank line is print

       System.out.println();

       // The largest number is printed

       System.out.println("The largest number is: " + getLargest(array));

       // computeTwice method is called to display the array after

      // multiplying each element by 2

       computeTwice(array);

       System.out.println( "The values of the computed twice array is: " );

       // Arrays class is used to print the array in form of a string

      // not object

       System.out.println(Arrays.toString(array));

   }

   

   //printReverse method declared with inputArray as parameter.

   // It has no return type

   public static void printReverse(int[] inputArray){

       System.out.print("Here is the arrray in reverse order: ");

       // A loop goes through the array starting from the end

       // and display each element

       for(int i = (inputArray.length - 1); i >= 0; i--){

           if(i == 0){

               // If the last element, do not append comma

               System.out.print(inputArray[i]);

           } else {

               // If not the last element, do append a comma

               System.out.print(inputArray[i] + ", ");

           }

       }

   }

   

   // getLargest method is declared with inputArray as parameter

   //  it compare each element in the array and return the largest

   public static int getLargest(int[] inputArray){

       // The first element is assumed to be the largest before the

      // loop begin

       int max = inputArray[0];

       for(int i = 1; i < inputArray.length; i++){

           if (inputArray[i] > max){

               max = inputArray[i];

           }

       }

       return max;

   }

   

   // computeTwice is declared with inputArray as parameter

   // it loop through the array and multiply each element by 2

   // it then return a modified array

   public static int[] computeTwice(int[] inputArray){

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

           inputArray[i] *= 2;

       }

       return inputArray;

   }

}

8 0
3 years ago
While recording a voice, if the narration is large,it is better to make a :a)a linked object b)an embedded object c)none d)does
goldenfox [79]

Answer:

c)none

Explanation:

Automatic updates can be a great problem in the case of the linked object and an embedded object. Hence, "a" and "b" are not the correct options, and since there is an effect, the d. the option is also not correct, as it does affect. And hence none of these options are correct. And the correct option is c) none.

4 0
2 years ago
SOMEBODY HELP ME ASAP PLEASE AND THANK YOU
Paha777 [63]

Answer:

Isnt there another thing that is supposed to be there like some website

Explanation:

7 0
2 years ago
Read 2 more answers
Other questions:
  • HELPPP ASAPP
    8·2 answers
  • What is the most consistent item regardless of the software used in BI?
    5·1 answer
  • You've applied a filter. What's the best way to see the original data?
    11·2 answers
  • Traditional methods of business communication tend to mean paper-based messages such as formal letters, brochures, reports, prop
    10·1 answer
  • Which function can you perform on a word processor but not on a typewriter?
    15·2 answers
  • Use the following scale to rate yourself: (There is no wrong answer
    8·1 answer
  • (14) Click on the
    7·2 answers
  • Where is the element coded in a web page.
    13·1 answer
  • A network of computers that provides access to information on the web.
    15·2 answers
  • What paradigm is this code based on? How do you know?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!