Some articles say level of a root node is 0 whereas some say it's 1.
From https://www.gatevidyalay.com/tree-data-structure-tree-terminology/
In a tree, each step from top to bottom is called as level of a tree. The level count starts with 0 and increments by 1 at each level or step.
Here level of root is 0
And in http://typeocaml.com/2014/11/26/height-depth-and-level-of-a-tree/
The important thing to remember is when talking about level, it starts from 1 and the level of the root is 1. We need to be careful about this when solving problems related to level.
So it says that level is 1
I can't understand which one is correct.