This is an implementation of LCA from geeksforgeeks.org
on running the node script using node LCA.js
for the following tree
the output looks like this
I have implemented unit test using a javascript framework called jest. This is the report on my tests.