Your question is Implement a Binary Search Tree. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Demonstrate how you would implement a binary search tree.
Implement insertion, search, deletion, and inorder traversal. Duplicate values should be ignored. The function receives initial values and operations, then returns the final inorder traversal and results for every search operation.
Signature: def implement_bst(values, operations):
values is a list of integers. Each operation is a dictionary such as {"type": "insert", "value": 8}, {"type": "delete", "value": 8}, or {"type": "search", "value": 8}. Return {"inorder": [...], "search": [...]}.
def implement_bst(values, operations):