Update minimum depth of binary tree