Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can you please help me in this homework? EX 3.2 List the collections in the Java

ID: 3744408 • Letter: C

Question

Can you please help me in this homework?

EX 3.2 List the collections in the Java Collections API and mark the ones
that are covered in this text.

EX 3.6 What should be the time complexity of the isEmpty(), size(),
and toString() methods?

EX 3.9 Draw an example using the five integers (12, 23, 1, 45, 9) of how
a stack could be used to reverse the order (9, 45, 1, 23, 12) of
these elements.

PP 3.2 Design and implement an application that reads a sentence from
the user and prints the sentence with the characters of each
word backwards. Use a stack to reverse the characters of each
word.

Explanation / Answer

1. Set List Queue Dequeue

2. isEmpty should be O(1), as well as size(). toString method can be O(N)

3. One by one push all the elements of array into stack.. after which stack will look like: 12, 23, 1, 45, 9:
where, 9 will be at top. Now if we start removing the eleemnts, they will be retrieved in reverse order, which will be: 9, 45, 1, 23, 12.

4.

in case of any issues, please comment and i will help. Thanks!