Using generators for on-demand tree traversal

Let’s take a short break from the ongoing series of posts on AI to look at an interesting problem and a useful accompanying concept.

Problem: Given a BST and a value k, find two elements in the BST which sum to k.

Continue reading

Advertisements