def identical(self, rs): """ --------------------------------------------------------- Determines whether two BSTs are identical. Use: b = bst.is_identical( rs ) ------------------------------------------------------- Preconditions: rs - another bst (BST) Postconditions: returns identical - True if this bst contains the same values in the same order as rs, otherwise returns False (boolean) ------------------------------------------------------- """ Add the method to your bst_linked.py file in your data_structures project. Test it from q1.py. Hint: the method is recursive and requires an auxiliary function.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
30 | 31 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 1 | 2 | 3 |
Get Free Quote!
408 Experts Online