I am posting an improved version of the algorithm put forward in the questionquestion for anyone that might be looking for a more concise answer.
I added a constructor to the BoundsBounds class which allows me to assign the Bounds instanceBounds instance directly into the stack :
I have added the Node class that I am using at @greybeard's suggestion. It only has three fields; fields: left child node, right child node and an integer val.
The runtime is O(n)\$O(n)\$. The primary advantage it has over @coderodde's solution is that it does not require the existence of the parent node.