Question
JAVA Program: reverse a linked list and find the middle node in the linked list. inFile (use argv[1]): A text file contains a list of
JAVA Program: reverse a linked list and find the middle node in the linked list.
inFile (use argv[1]): A text file contains a list of English words (strings), giving below
outFile1 (use argv[2])a text file includes
i) The completed sorted linked list, in ascending order.
//With caption indicating you are printing the original sorted list
ii) The reversed linked list.
//With caption indicating you are printing the reversed sorted list
outFile2( use argv[3]): All debugging outputs.
(Do not print this file in the hard copy!! )
string list in a text file:
Hishaam Esteban Kevin
Matthew Brandon
Joel Luis Jianwei Yechiel
Taeyong
Jiayu
Jiade Phillip
Russell Mohebullah
Akshar Evgeniia Andres Marco Justin
Robin Kelvin Zhiheng Jeffrey
Yifei Yinyu
Jiaxin Youyia Eleftherios
Yuan
print the list to outFile, from listHead to the end of the list in the following format:
listHead -> (this node data, this nodes memo address, next nodes memo address, next nodes data) -> (this node data, this nodes memo address, next nodes memo address, next nodes data) -> . . . . . -> NULL
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