Answered step by step
Verified Expert Solution
Question
1 Approved Answer
good evening, This is my code and output, and there is a problem which is: when i enter the sentance, in reverce it reflect letters,
good evening, This is my code and output, and there is a problem which is: when i enter the sentance, in reverce it reflect letters, and I want it to reflect words, not letters.
Enter choice: 3 Enter A sentance : hi welcome back Added Before : hi welcome back After: kcab emoclew ih MENU : 1. Cipher 2. Merge 3. Singly IinkedList: 4. Exit Enter choice: ) static void reverse(String str) 1 1 public void printininkedtist (singlyLinkedList sList) f Node h= sist. head; while (sIist.head I= null) f System.out.print (stist.head. data + " ") ; sIist. head = sIist. head. next; 1) System. out.println(); stist. head =h. ) class Nodef public string datai Node next; public Node(string data) I this.data: = data; this.next = null; 1 So can you solve the problem? Because I couldn't
i want the after be like this:
After: back welcome hi
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started