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
ziro4ka [17]
3 years ago
13

Suppose we are comparing the implementations of insertion sort and merge sort on the same machine(You don’t need to know the alg

orithm to do this problem!). For inputs of size n, insertion sort runs in 8n^2, while merge sort runs in 64nlgn steps. For which values of n does insertion sort beat merge sort?
Computers and Technology
1 answer:
Anuta_ua [19.1K]3 years ago
4 0

Answer:

123456789o0

Explanation:

You might be interested in
1. Discuss the pros and cons of human-computer interaction technology?
Lana71 [14]

!

gcoo!!Exykgvyukhhytocfplanationufvhyg:

3 0
3 years ago
You have a notebook computer and wish to connect to an IEEE 802.11n wireless network. The computer does not have a built-in wire
Ira Lisetskai [31]

Answer:

The wireless adapter to use is the Wireless USB 2.0 Extender

Explanation:

The Wireless USB 2.0 Extender is a USB component that enables a computer to connect to and communicate with other computers on a network, or even to connect to the internet.

It uses an IEEE 802.11g radio platform and communicates within a radio frequency range of 2.4GHz.

Therefore, in cases where a notebook computer does not have a built-in wireless LAN card or PC card interface, you can use the Wireless USB 2.0 Extender as the best solution to that problem.

3 0
2 years ago
Write a Java program to encrypt and decrypt a phrase using two similar approaches, each insecure by modern standards. The first
xeze [42]

Answer:

See explaination

Explanation:

//CryptoManager.java

public class CryptoManager {

static int LOWER_BOUND=32;

static int UPPER_BOUND=95;

/*This method determines if a string is within the allowable bounds of ASCII

codes according to the LOWER_BOUND and UPPER_BOUND characters. The parameter

plainText is the string to be encrypted. The method returns true if all

characters are within the allowable bounds, false if any character is outside.*/

public static boolean stringInBounds (String plainText)

{

boolean flag=true;

//determines if a string is within the allowable bounds of ASCII

//codes according to the LOWER_BOUND and UPPER_BOUND characters.

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

{

if(!((int)plainText.charAt(i)>=LOWER_BOUND && (int)plainText.charAt(i)<=UPPER_BOUND))

{ //false if any character is outside the bounds

flag=false;

break;

}

}

//returns true if all characters are within the allowable bounds

return flag;

}

/*This method encrypts a string according to the Caesar Cipher. The integer key

specifies an offset and each character in plainText is replaced by the character

the specified distance away from it. The parameter plainText is an uppercase

string to be encrypted. The parameter key is an integer that specifies the

offset of each character. The method returns the encrypted string.*/

public static String encryptCaesar(String plainText, int key)

{

//Wrap around the key, if it is greater than the UPPER_BOUND

key=Wrap_around(key);

//encrypted text

String res="";

//encryption

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

{

res+=Character.toString((char) ((int)plainText.charAt(i)+key));

}

//return result

return res;

}

/* This method decrypts a string according to the Caesar Cipher. The integer

key specifies an offset and each character in encryptedText is replaced by

the character "offset" characters before it. This is the inverse of the

encryptCaesar method. The parameter encryptedText is the encrypted string

to be decrypted, and key is the integer used to encrypt the original text.

The method returns the original plain text string.*/

public static String decryptCaesar(String encryptedText, int key){

//Wrap around the key, if it is greater than the UPPER_BOUND

key=Wrap_around(key);

//decrypted text

String org="";

//encryption

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

{

org+=Character.toString((char) ((int)encryptedText.charAt(i)-key));

}

//return result

return org;

}

public static int Wrap_around(int key)

{

while(key>UPPER_BOUND)

{

key-=(UPPER_BOUND-LOWER_BOUND);

}

return key;

}

/* This method encrypts a string according to the Bellaso Cipher. Each character

in plainText is offset according to the ASCII value of the corresponding

character in bellasoStr, which is repeated to correspond to the length of

plaintext. The method returns the encrypted string.*/

public static String encryptBellaso(String plainText, String bellasoStr)

{

//encrypted text

String res="";

//Adjust length of bellasoStr to plainText

while(bellasoStr.length()<plainText.length())

{

bellasoStr+=bellasoStr.substring(0,(plainText.length()-bellasoStr.length()));

}

//encryption

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

{

char c=(char)Wrap_around((int)plainText.charAt(i)+(int)bellasoStr.charAt(i) );

res+=Character.toString(c);

}

//return result

return res;

}

/*

This method decrypts a string according to the Bellaso Cipher. Each character

in encryptedText is replaced by the character corresponding to the character in

bellasoStr, which is repeated to correspond to the length of plainText. This is

the inverse of the encryptBellaso method. The parameter encryptedText is the

encrypted string to be decrypted, and bellasoStr is the string used to encrypt

the original text. The method returns the original plain text string.*/

public static String decryptBellaso(String encryptedText, String bellasoStr)

{

//decrypted text

String res="";

//Adjust length of bellasoStr to plainText

while(bellasoStr.length()<encryptedText.length())

{

bellasoStr+=bellasoStr.substring(0,(encryptedText.length()-bellasoStr.length()));

}

//decryption

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

{

char c=(char)Wrap_around((int)encryptedText.charAt(i)-(int)bellasoStr.charAt(i) );

res+=Character.toString(c);

}

//return result

return res;

}

}

6 0
2 years ago
What is the scope of each variable?
kari74 [83]

Answer:

scope of pet name is limited to pet class and color is accessible to the whole program

Explanation:

4 0
3 years ago
Read 2 more answers
Computer-generated color images of the brain that provide information about brain activity and glucose metabolism are produced b
frozen [14]

The answer to this question is the PET scan. Positron Emission Tomography or PET scan is an imaging test that checks and trace for diseases in the body. This also shows how the body organs is functioning / working. The doctor can evaluate the function of the patients body by the 3D color images produced by the PET Scan.  

4 0
2 years ago
Other questions:
  • Using the Invert Selection tool while something is selected in Paint will __________.
    14·1 answer
  • Who can provide you with a new password when you have forgotten your old one?
    14·2 answers
  • In addition to telling you which programs are currently running, what other information does the task bar display
    10·1 answer
  • Trong ửod muốn trình bày dạng cột càn thực hiện lệnh nào
    13·1 answer
  • Which category does this fall in identity theft​
    6·1 answer
  • BitTorrent, a P2P protocol for file distribution, depends on a centralized resource allocation mechanism through which peers are
    8·1 answer
  • At year end, Clean123 Inc. has 45500 in cash, 55000 in accounts receivable, 54400 in service equipment, 550 in prepaid insurance
    12·1 answer
  • Binary is best interpreted by a computer because ​
    12·2 answers
  • Discuss the advantages and disadvantages of supporting links to files that cross mount points (that is, the file link refers to
    6·1 answer
  • Mack signs into his laptop and gets a message saying all his files have been encrypted and will only be released if he sends mon
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!