Software development · Independent
Autocomplete Search & Data Structures
A Java search application comparing list, tree, and trie approaches to exact-word and prefix matching, with a GUI designed in FXML.
- Java
- JavaFX
- FXML
- JUnit
Goal
Explore how storage choices change exact-word lookup and prefix matching, and make the search behavior accessible through a desktop interface.
My Role
I implemented search backends behind a common AutoCompleter interface, a custom trie backed by a generic ListMap, and the JavaFX interface in FXML with controller event handlers.
How It Works
Compare lookup strategies through one API
Unordered and ordered adapters use ArrayList and LinkedList. Ordered lookup and insertion use binary search; a TreeSet adapter uses library-provided range queries for prefix matching.
Represent prefixes explicitly
My trie uses terminal-word markers and recursive prefix collection. A custom generic ListMap stores child-node mappings and handles duplicate keys.
Expose the search behavior
The FXML GUI connects controls for loading word sets, displaying suggestions, selecting list storage, and reporting search durations.
Testing & Debugging
The committed trie and map code passes all 13 existing unit tests covering autocomplete and map behavior. In the GUI, suggestions currently come from the list-based search: the controller creates a trie but doesn’t yet load the word set into it.
Result
I built list, tree, and trie search backends behind one interface, plus a JavaFX/FXML desktop app for running searches. My next step is wiring the trie fully into the GUI so its search times can be compared directly with the list backends.