subject

The following function returns a random string of length n. what is the order of growth of its running time as a function of n?
public static string random(int n) {
if (n == 0) return "";
int r = stdrandom. uniform(26); // between 0 and 25
char c = 'a' + r; // between 'a' and 'z'
return random(n/2) + c + random(n - n/2 - 1);

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:50, prettybaby406
Explain why it is reasonable to assume that receiving 3 duplicate acks in tcp is an indication that the network is not currently congested.
Answers: 1
image
Computers and Technology, 23.06.2019 12:00, xojade
Which of these is an example of an integrated presentation? a. a table created in powerpoint b. an image pasted into powerpoint c. a caption created in powerpoint d. an excel chart pasted into powerpoint
Answers: 1
image
Computers and Technology, 23.06.2019 14:30, rose6038
Select the correct answer. peter has launched a website that features baby products. however, clients often find they are unable to access the website because the server is down. which feature of cybersecurity should peter focus on for his website? a. data authenticity b. data privacy c. data availability d. data integrity e. data encryption
Answers: 3
image
Computers and Technology, 24.06.2019 14:00, ratpizza
Which describes careers that have similar education requirements but different qualifications? product safety engineers and materials engineers industrial safety engineers and industrial health engineers quality control systems managers and inspectors industrial safety and health engineers and hand packers
Answers: 3
You know the right answer?
The following function returns a random string of length n. what is the order of growth of its runni...

Questions in other subjects:

Konu
History, 25.06.2019 04:30