How depth(value) is calculated

find the depth of
1 / 1

The calculation

current call search path so far found empty subtree (not found) 2value returned by that call

Each call either finds the value (return 0), hits an empty subtree (return −1), or asks the correct child and adds one edge to whatever comes back.