title: Removing duplicate words from an string array and writing to an output file
body: <p>I have an assignment that requires me to take the words from an input.txt file and sort them by frequency and then write them to an output.txt file.</p>
  
  <p>The problem I'm having is that once I find the frequency of each of the words from the input file, I have no idea how to remove the duplicates and how to keep them from being written to the output file. </p>