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
Jlenok [28]
3 years ago
5

Write a recursive function that prints out the items of a (possibly empty) singly linked list of integers in reverse order. The

function should run in linear time.
Computers and Technology
1 answer:
MrRa [10]3 years ago
8 0

Answer:

Follows are the method definition to this question:

void Reverse_Order(struct Node* h)//defining a recursive method Reverse_Order that takes structure in parameter

{

if (h == NULL)//use if block to check head equal to null

return;//use return keyword

Reverse_Order(h->next);//call method recursively

cout<<h->data;//print data

}

Explanation:

In the above code, a recursive method "Reverse_Order" takes structure as the parameter, and inside the method, structure variable h is used that uses the if conditional statement to check the header equal to null.

In the condition is true, it will use the return keyword, and in the next step, it calls the method recursively, and print its value in the reverse order.

You might be interested in
Which one of the following devices would you choose to meet those requirements?
tensa zangetsu [6.8K]
What are the requirements
5 0
2 years ago
Read 2 more answers
When artists have a successful career, there is sometimes the need to collect all their works in an anthology album. Given main(
elixir [45]

Answer:

Answered below

Explanation:

public class BoxSet extends Album{

private boolean isCompleteWork;

private int numDiscs;

public void setIsCompleteWorks( boolean cw){isCompleteWorks = cw;

}

public boolean getCompleteWorks(){

return isCompleteWorks;

}

public void setNumDiscs(int discs){

numDiscs = discs;

}

public int getNumDiscs(){

return numDiscs;

}

public void printInfo(){

super.printInfo();

System.out.print(isCompleteWorks);

System.out.print(numDiscs);

}

}

3 0
3 years ago
Helen is filling her persönal details on her résumé. Which detail should she include in this section?
svetoff [14.1K]

I would think option A.

b doesn't give enough information and c would go under last work experience

4 0
3 years ago
A Supermarket manager hired one packager who can pack 15 boxes every two minutes. Ater some time the manager noticed that packag
Semenov [28]

Answer:

40mn

Explanation:

500/t=15/2+15/3

500/t=75/6

75t=500×6

t=3000/75

t=40

6 0
3 years ago
Read 2 more answers
---------------is a systematic review of a person’swork and achievements over a recent period, usually leading toplans for the f
Rama09 [41]

Answer:

Performance appraisal

Explanation:

Performance appraisal is a systematic review of a person’swork and achievements over a recent period, usually leading toplans for the future.

8 0
3 years ago
Other questions:
  • A new protocol for new information distribution proposed by CERN became the world wide wed in 1991.
    10·1 answer
  • Deon would like to add a lot of color to a web page for a local accounting office even though they are a very conservative offic
    6·1 answer
  • what is the the process of sending a packet from one host to a selected group of hosts, possibly in different networks?
    5·1 answer
  • How to copy and paste things that won't let you?
    14·1 answer
  • If you were creating a program that would convert Fahrenheit to Celsius, which kind of variable would you want to use? a string
    7·2 answers
  • Heres a survey
    7·2 answers
  • How do you change the colors of files?
    11·1 answer
  • PLEASE HELP!!!
    8·1 answer
  • What is printed when the following code has been executed?
    9·1 answer
  • Es el nombre que se le da a la<br> intersección de una columna y fila:
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!