Question: Here is another question of Algorithms problem 2c that is last part of the previous two parts I posted its from the book Algorithms 4th
Here is another question of Algorithms problem 2c that is last part of the previous two parts I posted its from the book "Algorithms 4th edition by Robert Sedgewick/ Kevin Wayne, I need its correct answer please help me.

2c) Write a filter Swap.java that reads strings one at a time from standard input and prints them to standard output in reverse order. Use either a stack or a queue. Run your program on the file "tinytinytale.txt" which is located in algs4 or on our IT516 Blackboard site under "Diagrams, docs, code". For instance, "tic tac toe" should return "toe tac tic 35
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
