Read the input one line at a time and then write the lines out in reverse order, so that the last input line is printed first, then the second last input line, and so on. Read the input one line at a ...Read the input one line at a time and then write the lines out in reverse order, so that the last input line is printed first, then the second last input line, and so on. Read the input one line at a time and write each line to the output only if you have already read this line before. (The end result is that you remove the first occurrence of each line.) Take special care so that a file with a lot of duplicate lines does not use more memory than what is required for the number of unique lines.