Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
invert-tree: Add test cases for asymmetric trees
My first attempt at this challenge takes a tree like this: ``` A / B ``` and makes it into a tree like this: ``` A / \ B B ``` when it should produce a tree like this: ``` A \ B ``` However, my flawed solution was passing the single test example that currently exists for this challenge. I have added two test examples, one for a left-leaning asymmetric tree and one for a right-leaning asymmetric tree. These examples catch the type of flaw discussed above, and should be helpful in encouraging/forcing challengers to clean up after old child nodes.
- Loading branch information