Algorithm to find Level of each node from root node


This is a companion discussion topic for the original entry at http://iq.opengenus.org/find-level-of-node-from-root/