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
vfiekz [6]
3 years ago
7

Write the recurrence relation for the following program fragment, assuming somethingElse(n) requires constant amount of work. Yo

u don’t have to solve this recurrence relation.int something (int n) { if (n < 50) { System.out.println("!"); return n+10;else { return something(n-1) + somethingElse(n);
Computers and Technology
1 answer:
IgorC [24]3 years ago
8 0

Answer:

 = T(n) = 1  for n < 50

  = T(n) = T(n-1) + 1 for  n >= 50

Explanation:

The Given program fragment is :

int something (int n) {

if (n < 50) {

       System.out.println("!");

return n+10;

else {

    return something(n-1) + somethingElse(n);

  }

}

The recurrence relation for the program fragment above can be expressed as :

      = T(n) = 1  for n < 50

also T(n) = T(n-1) + 1 for  n >= 50

You might be interested in
Why are streak plates used to test minerals?
Sphinxa [80]

A. Small impurities can cause big changes in the color of a mineral.

5 0
3 years ago
Read the code below.
Rasek [7]

Answer:

theres an error on line one used python idle

Explanation:

8 0
4 years ago
Will give brainlist. plzz hurry
Leya [2.2K]

Answer:

responsive

Explanation:

responsive  design  resizes itself to best suit your device

(mark brainliest please)

5 0
3 years ago
Read 2 more answers
Green field country is planning to conduct a cricket match between two teams A and B. a large crowd is expected in the stadium a
Angelina_Jolie [31]

Answer:

We need the Network Interface Card that supports serial transmission, and they are EIA RS-422A and RS-485 interfaces. Always remember that serial transmission is slower than parallel transmission, but they are less noisy as compared to the parallel transmission. In both of these NICs, we can have one transmitter and multiple receivers over a single line. And the length of the line can be as big as 6000 Feet and speed up to 10 MBPS, which is quite good for this question requirement.

Explanation:

Please check the answer.

7 0
3 years ago
: how do network effects help facebook fend off smaller social-networking rivals?
Charra [1.4K]
How do network effects help Facebook fend off smaller social-networking rivals? The way a network effect works it that one user of a good or service determine the value of the product to other people. Depending on how many people use the product or service, allows the network to see the value they believe it holds. Because Facebook has billions of users, they have a high value and strong network. 
5 0
4 years ago
Other questions:
  • Distinguish between engineering and architecture​
    5·1 answer
  • 1. What is the main factor that affects Earth’s average temperature?
    12·1 answer
  • A Venn diagram is used to show...?<br> Plz help
    10·2 answers
  • Describe the Pros and Cons Associated with Cloud Computing Cloud Computing was introduced in 1999 by a company named "Salesforce
    12·1 answer
  • 11. Which one of the following buttons is used for paragraph alignment?<br>​
    12·1 answer
  • Create a program in Python that prompts the user to enter an integer number within the range of 1 to 10 inclusive. The program s
    15·2 answers
  • Is greedy algorithm non deterministic by nature?
    13·1 answer
  • What output is generated by this for loop?
    6·1 answer
  • What animal is perry the platypus ​
    6·2 answers
  • Write one line Linux command that performs the required action in each of the problems given below: (a) Find the difference in t
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!