This question evaluates understanding of binary search tree properties, traversal techniques, and the ability to implement both recursive and iterative algorithms while reasoning about time and space complexity.

Given the root of a binary search tree and two integers low and high (inclusive), compute the sum of values of all nodes with low <= val <= high. Provide both recursive and iterative solutions that prune branches using BST properties, and analyze time and space complexity.