/Trie-Data-Structures-For-String-Manipulation-And-Searching-With-Prefix-And-Suffix

This project implements a 26-way Trie data structure to manipulate and manage strings efficiently.Then inserts all words to the trie from the given txt file.

Primary LanguageJavaMIT LicenseMIT

Trie-Data-Structures-For-String-Manipulation-And-Searching-With-Prefix-And-Suffix

This project implements a 26-way Trie data structure to manage strings efficiently.Then inserts all words to the trie from the given txt file. Searches an argument in the trie,prints all strings start with given prefix in the trie, lexicographically, prints all strings end with given suffix in your trie, lexicographically , prints all strings start with given prefix and end with given suffix in the trie, lexicographically and prints top k words that have most occurrences,in the trie. This project uses Command Line Interface(CLI) It uses Singly Linked List Data Structure in order to find full auto complete. It also uses Linear Probing Hashing and priority queue to find the most frequently occurring strings in the Trie.

Author

  • Arda Baran

Features

  • Insert Words: Add words to the Trie from txt file.
  • Search Words: Check if a word is present in the Trie.
  • Prefix Matching: Find words that start with a given prefix.
  • Suffix Matching: Find words that end with a given suffix.
  • Auto-complete: Suggest words based on a given prefix.
  • Full Auto-complete: Find words that start with a given prefix and end with a given suffix.
  • Top K Frequent Words: Find and display the most frequently occurring words in the Trie.

Technologies And Data Structures Used

  • Java
  • Trie Data Structure
  • 26-Way Trie
  • Linear Probing Hash Table
  • Array
  • Singly Linked List Implementation
  • Object Oriented Programming
  • Priority Queue
  • txt

File Structure

  • src/: Contains the Java source code
  • resources/: txt file (e.g., Input1.txt)