Skip to main content

Binary Trees and Tries Exercises

Part 1: Binary Trees and Tries Exercises

After viewing the first myGA module, Binary Trees and Tries, you can complete the exercises in binaryTree.js.

You can automatically test your progress by running npm install inside this folder to install the automated testing libraries, then run npm test to see if your functions pass the test cases.

Note: The height() and isBalanced() functions should be considered an optional challenge that prepares you for the second lesson's challenges.

Optional Trie Challenge

The "wordTrie-challenge" folder contains an optional challenge asking you to implement a search trie based on all the words in the English language. This is optional and advanced, but if you mastered building a binary tree, you should take on this challenge!

This project folder also contains automated tests that can be run in the same way.

Part 2: Self-Balancing Binary Tree Exercise

After viewing the second myGA module, Balancing a Binary Tree, you can complete the exercises in AVLTree.js.

These exercises are also optional and advanced content.