Back-end code for Coursera course by University of California San Diego.
Centers on environment set up, ensure you have a JDK 1.8 + with a supporting Eclipse IDE.
Setup can be tricky, consider your java path, jfx location and compiler compliance level.
The error prompts spice things up, google's your friend. *wink
Focuses on implementations in the document package.
A view on String immutability, memory models, interned strings and regular expressions.
Centers on performance (Asymptotic Analysis and Benchmarking), below is a plot comparing two classes in the document package.
BasicDocument in blue has a steeper linear slope performing poorly as the input scales, compared to EfficientDocument in red.
Benchmark Plot:
In Part 1, JUnit is used to adopt a test-driven approach in developing a doubly linked list using sentinels.
In Part 2, a random MarkovTextGenerator is built. One key view is the space complexity advantage a StringBuilder has over immutable strings.
Part 1: Spell checking and more benchmarking
(Trie over TreeSet/Balanced BST, TreeSet over BST, BST over General Tree, LinkedList is a Tree in essence).
Implemented a dictionary of words, and compared the performance of using a Binary Search Tree over a LinkedList. The TreeSet in the Java API uses balanced BSTs to store keys facilitating more efficient insertion and retrieval.
The benchmark plot below shows the linked list implementation in red performing poorly when compared to the logrithmic plot of a balanced BST represented in yellow.
Benchmark Plot:
Tries have a potential performance advantage over TreeSets(Balanced BSTs) as the structure of the stored key is used to navigate the search.
BST only take advantage of their order relevant to each other.
Linked List Implementation: DictionaryLL class
TreeSet Implementation: DictionaryBST class
Trie Implementation: AutoCompleteDictionaryTrie class
...