14.7 enumerate numbers of the form a + b*sqrt(2)

#1

Hi:

I have a question on this problem.

In your BST implementation, you explained that adding elements can lead to duplication. But in the code you provided, there’s nothing related to “deduplication.” Do you assume that your BST insertion will eliminate duplicated insertions?

Thanks.

1 Like

#2

Yes, I think in C++ and Java, their BST will eliminate those automatically.

0 Likes