Skip to content

dtriska/CS3310Assignment2

Repository files navigation

CS3310 Assignment 2

Overview

This Java program, Anagram.java, is designed to read a list of words from an input file, search for anagrams of each word in a CSV file, and write the results to an output file. Anagrams are words or phrases formed by rearranging the letters of another word or phrase. The program sorts each word alphabetically and matches it with its anagrams from the CSV file.

Features

  • Read words from an input file.
  • Search for anagrams of each word in a CSV file.
  • Write results to an output file.

Requirements

  • Java Development Kit (JDK) installed
  • Input file containing a list of words
  • CSV file containing sorted words and their anagrams

Usage

  1. Compile the Java code: javac Anagram.java
  2. Run the Java code: java Anagram <input_file>

Anagram Frequency Counter

Overview

This C++ program, Anagram Frequency Counter, reads a list of words from an input file, counts the frequency of characters in each word, sorts the characters alphabetically, and writes the sorted frequency along with the corresponding words to a CSV file. Anagrams are words or phrases formed by rearranging the letters of another word or phrase. The program then stores the sorted frequency as the key in a dictionary and maintains a list of words corresponding to each sorted frequency.

Features

  • Read words from an input file.
  • Count the frequency of characters in each word.
  • Sort the characters alphabetically.
  • Write the sorted frequency along with the corresponding words to a CSV file.

Input

The input file words.txt should contain a list of words separated by spaces or newlines.

Output

The output file output.csv will be generated by the program and will contain the sorted frequency in the first column and the corresponding words in the second column.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published