Question: USING JAVA(i will give a thumbs up) Assume numbers points to a linked list of LLNode. Write code that prints the following. Do not forget

USING JAVA(i will give a thumbs up)

Assume numbers points to a linked list of LLNode. Write code that prints the following. Do not forget to consider the case where the list is empty. Recall that LLNode exports setters and getters for both info and link.

a.The sum of the numbers on the list .

b.The count of how many elements are on the list

c. The count of how many positive numbers are on the list

d.The enumerated contents of the list; for example, if the list contains 5, 7, and 9 the code will print 5 ,7 , -9

e. The reverse enumerated contents of the list (hint: use a stack); for example, if the list contains 5, 7, and 9 the code will print -9, 7, 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!