GfG QA is closing soon... Please refer PRACTICE or GfG now on wards !!

Java-making linked list from file input in sorted order with following conditions

There is a file which has the following contents

---------------------------------------------------------------------------------------------------------

Sorted-Ascending : [10] 12 09 98 77 76 66 43

Sorted-Decending : [12] 12 34 56 78 23 12

Add-At-Middle : [3] 1 2 3 4 5 6 7 8 9 10

----------------------------------------------------------------------------------------------------------

User will give the filename as an input. You have to make a linked list out of it in the order mentioned. Once you have the linked list, print the linked lists on the screen. Format of the file:

First Field till ":" is the operation to be done.

Second field in [] is the number of numbers in that line. If this is not equal to the number of integers in that line, its an error.

The space separated numbers. If the numbers are not in proper format (not an integer) do not add that number to the linked list. Print proper message.

asked Aug 21, 2016 by anonymous
edited Aug 22, 2016
...