DIY: Range Sum of BST
Learn to compute the sum of node values in a Binary Search Tree that fall within a given range. This lesson helps you implement a rangeSum function in Swift, enhancing your problem-solving skills for coding interviews by working through real examples.
We'll cover the following...
We'll cover the following...
Problem statement
For this challenge, you are given the root node of a binary search tree and two values: low and high. Your task is to return the sum of the values of all nodes in BST that are value between ...